CN106802794B - Theme switching method, device, vehicle and system - Google Patents

Theme switching method, device, vehicle and system Download PDF

Info

Publication number
CN106802794B
CN106802794B CN201611184086.3A CN201611184086A CN106802794B CN 106802794 B CN106802794 B CN 106802794B CN 201611184086 A CN201611184086 A CN 201611184086A CN 106802794 B CN106802794 B CN 106802794B
Authority
CN
China
Prior art keywords
theme
pack
tool class
android system
class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611184086.3A
Other languages
Chinese (zh)
Other versions
CN106802794A (en
Inventor
佟广力
赵江
秦国梁
季申
沈海寅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhicheauto Technology Beijing Co ltd
Original Assignee
Zhicheauto Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhicheauto Technology Beijing Co ltd filed Critical Zhicheauto Technology Beijing Co ltd
Priority to CN201611184086.3A priority Critical patent/CN106802794B/en
Publication of CN106802794A publication Critical patent/CN106802794A/en
Application granted granted Critical
Publication of CN106802794B publication Critical patent/CN106802794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a theme switching method, a device, a vehicle and a system, which are used for switching themes of an Android system or an Android system application, wherein the method comprises the following steps: receiving and analyzing a theme switching request to obtain a theme switching type and a theme identifier; obtaining a theme pack corresponding to the theme identification; if the theme switching type is to change the theme layout, acquiring an interface display tool class corresponding to the theme pack, calling a layout resource file in the theme pack through the interface display tool class, calling a replacement function in an interface display tool class manager, and updating an original interface display tool class in the Android system or the Android system application into the interface display tool class calling the layout resource file in the theme pack. According to the theme package layout method and device, the theme package is obtained, and the layout resource files in the theme package are called through the interface display tool, so that the purpose of changing the theme layout is achieved, and rapid theme switching can be achieved.

Description

Theme switching method, device, vehicle and system
Technical Field
The invention relates to the field of intelligent equipment, in particular to a theme switching method, device, vehicle and system based on an Android system.
Background
The Android system is gradually widely applied to various terminals and wearable devices, and various kinds of APP (applications) running on the Android system are greatly convenient and enrich daily lives of people. However, with the increase of personalized demands of people, the single style of APP (Application) cannot meet the personalized demands of users.
In the process of implementing the invention, the inventor finds that the theme switching of the Android system is a skin changing scheme at present, namely, only the color and the picture of the APP or the Android system are changed. In practice, it is often desirable to implement a large change in layout between different themes by theme switching. Currently, theme switching of an Android system cannot realize theme layout change.
Disclosure of Invention
The invention aims to solve the technical problems that: the theme switching method, device, vehicle and system based on the Android system can achieve theme layout change.
The invention provides a theme switching method, which is used for switching themes of an Android system or an Android system application, and comprises the following steps: receiving and analyzing a theme switching request to obtain a theme switching type and a theme identifier; obtaining a theme pack corresponding to the theme identification; if the theme switching type is to change the theme layout, acquiring an interface display tool class corresponding to the theme pack, calling a layout resource file in the theme pack through the interface display tool class, calling a replacement function in an interface display tool class manager, and updating an original interface display tool class in the Android system or the Android system application into the interface display tool class calling the layout resource file in the theme pack.
Optionally, the method further includes: and if the theme switching type is to change the theme view, acquiring the view resource file in the theme pack, calling a view switching function, and updating the original view resource file in the Android system or the Android system application to the view resource file acquired from the theme pack.
Optionally, if the theme switching type is to change the theme layout, the method further includes: creating a class loader; the obtaining of the interface display tool class corresponding to the theme pack includes: and acquiring the name of the interface display tool class corresponding to the theme pack, and loading the interface display tool class with the name corresponding to the theme pack by using the class loader.
Optionally, the method further includes: modifying the interface display tool class and the interface display tool class manager of the Android system or the Android system application in advance, thereby providing a calling interface of the resource loading tool class; and the class loader loads the interface display tool class with the name corresponding to the theme pack through the calling interface of the resource loading tool class.
Optionally, the method further includes: creating the theme pack, wherein the theme pack comprises a layout resource file and/or a view resource file; and storing the theme pack locally at the terminal where the Android system is located, or storing the theme pack at a network side.
Optionally, the method further includes: inheriting an application tool class in advance, saving theme related information in the application tool class, initializing theme related resources, and completing creation of the theme pack.
The invention provides a theme switching device, which is used for switching themes of an Android system or an Android system application, and comprises: the theme switching request processing unit is used for receiving and analyzing the theme switching request to obtain a theme switching type and a theme identifier; the theme pack acquisition unit is used for acquiring a theme pack corresponding to the theme identification; and the theme layout change processing unit is used for acquiring an interface display tool class corresponding to the theme pack, calling the layout resource file in the theme pack through the interface display tool class, calling a replacement function in an interface display tool class manager, and updating the original interface display tool class in the Android system or the Android system application into the interface display tool class calling the layout resource file in the theme pack.
Optionally, the method further includes: and the change theme view processing unit is used for acquiring the view resource file in the theme pack, calling a view switching function, and updating the original view resource file in the Android system or the Android system application into the view resource file acquired from the theme pack.
Optionally, the method further includes: a class loader creating unit for creating a class loader; the theme layout change processing unit is further configured to obtain a name of an interface display tool class corresponding to the theme pack, and load the interface display tool class of the name corresponding to the theme pack by using the class loader.
Optionally, the method further includes: the calling interface providing unit is used for modifying the interface display tool class and the interface display tool class manager of the Android system or the Android system application in advance so as to provide a calling interface of the resource loading tool class; and the class loader loads the interface display tool class with the name corresponding to the theme pack through the calling interface of the resource loading tool class.
Optionally, the method further includes: and the theme pack creating unit is used for creating the theme pack, wherein the theme pack comprises a layout resource file and/or a view resource file, and the theme pack is stored in the local terminal of the Android system or in the network side.
Optionally, the method further includes: and the application tool class inheritance unit is used for inheriting the application tool class in advance, storing the theme related information in the application tool class and initializing the theme related resources to complete the creation of the theme package.
The invention provides an intelligent vehicle-mounted infotainment system which is used for controlling an intelligent vehicle.
The invention provides a vehicle, comprising: the intelligent vehicle-mounted information entertainment system comprises a theme switching device, and the theme switching device is used for carrying out theme switching on an Android system or Android system application.
The invention provides a vehicle control system which comprises an intelligent vehicle and a terminal used for controlling the intelligent vehicle, wherein an operating system of the terminal is an Android system, the terminal comprises a theme switching device, and the theme switching device is used for carrying out theme switching on an Android system or an Android system application.
Therefore, the invention provides a theme switching scheme aiming at the defect that the theme layout cannot be changed in the prior art, and the purpose of changing the theme layout is achieved by obtaining the theme package and calling the layout resource file in the theme package through the interface display tool. According to the method and the device, the rapid theme switching can be realized by calling the layout resource file in the preset theme pack. The method and the device can change the theme of the Android system and the themes of various APPs installed under the Android system, and bring fundamental brand new experience to users particularly through the change of theme layout. Of course, the invention can also realize the situation of changing the theme view, and achieve the purpose of changing the theme picture and color by calling the view resource file in the theme pack.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
The invention will be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:
fig. 1 is a flowchart of a theme switching method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a theme switching method according to another embodiment of the present invention.
FIG. 3 is a diagram illustrating the inheritance and invocation relationship of various classes and interfaces according to another embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a theme switching apparatus according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a vehicle control system according to an embodiment of the present invention.
Fig. 6 shows a block diagram of a vehicle according to an embodiment of the invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Aiming at the defect that the prior art cannot change the theme layout, the embodiment of the invention provides a theme switching scheme. It can be understood that the theme switching for changing the theme layout means that the page design, the page elements, the positions of the page elements, and the like of the theme are all changed, so that the theme after the change and the theme before the change are fundamentally different in layout. For example, in a smart car control APP, a number of themes are typically provided for the user to select, such as: music themes, cartoon themes, weather themes, etc., which often adopt different design styles in order to highlight a certain function. In order to realize theme switching for changing theme layout, the theme package corresponding to each theme is preset, and the layout resource files in the theme package are called through the interface display tool class, so that the purpose of changing the theme layout is achieved.
Referring to fig. 1, a flowchart of a theme switching method according to an embodiment of the present invention is shown. The theme switching method is used for carrying out theme switching on an Android system or an Android system application.
The method comprises the following steps S101-S105.
S101: and receiving and analyzing the theme switching request to obtain a theme switching type and a theme identifier.
The theme switching request is generally initiated by a user, for example, when the user changes a theme applied to the Android system or the Android system, a target theme, which is a theme to be switched by the user, is selected or clicked on an operation interface applied to the Android system or the Android system. As in the foregoing example, it is assumed that the theme styles include a music theme, a cartoon theme, and a weather theme, and the current theme is the music theme, and if the user wants to switch to the weather theme, the user clicks the weather theme, and at this time, a theme switching request is sent. The theme switching request comprises a theme switching type and a theme identifier, wherein the theme switching type refers to theme switching for changing theme layout or theme switching for changing theme view; the topic identification refers to information that uniquely identifies the target topic, for example, the topic identification may be a topic name, a topic ID, etc., so as to indicate which target topic is to be switched, for example, the weather topic in the above example.
S102: and obtaining a theme pack corresponding to the theme identification.
Before the embodiment of the invention is executed, the theme pack also needs to be preset. The theme pack can be understood as a special APP pack, and the theme pack contains resource files and a small amount of codes related to the theme. One theme pack corresponds to one operating system or APP, and a plurality of APPs cannot share and use the same theme pack.
In the embodiment of the invention, the theme switching comprises two types of theme switching for changing the theme layout and theme switching for changing the theme view, and the theme switching for changing the theme layout needs to call the layout resource file in the theme package, so as to achieve the purpose of changing the theme layout; for theme switching for changing the theme view, the view resource file in the theme package needs to be called, so that the purpose of changing the theme view is achieved. The layout resource file comprises parameters of page design of a theme, page elements, positions of the page elements and the like; the view resource file comprises parameters such as the color and the picture of the theme.
After the theme pack is created, the theme pack may be stored locally in a terminal (e.g., a smart phone or a smart car key) where the Android system is located, or the theme pack may also be stored on the network side, and the terminal acquires the theme pack from the network side through network connection.
Therefore, in a preferred mode, the method further comprises the following steps: creating a theme pack, wherein the theme pack comprises a layout resource file and/or a view resource file; and storing the theme pack locally at the terminal where the Android system is located, or storing the theme pack at a network side. The specific way of creating the theme pack may be: inheriting an Application tool class (such as the tool class of Application) in advance, saving the related information of the theme in the Application tool class and initializing related resources of the theme, and completing creation of the theme pack.
S103: whether to change the theme layout or the theme view is determined according to the theme switching type.
S104: if the theme switching type is to change the theme layout, acquiring an interface display tool class corresponding to the theme pack, calling a layout resource file in the theme pack through the interface display tool class, calling a replacement function in an interface display tool class manager, and updating an original interface display tool class in an Android system or an Android system application into the interface display tool class calling the layout resource file in the theme pack.
If the theme switching type is determined to change the theme layout, the layout resource file in the theme pack needs to be called. In actual operation, the calling can be performed through the interface display tool class. An interface display tool class, such as Fragment (a tool class for interface display provided by the Android system), may call the layout resource file in the theme pack through Fragment. After the layout resource file is called, the original interface display tool class in the Android system or the Android system application is updated to the interface display tool class calling the layout resource file in the theme pack by calling a replacement function (e.g., Replace function) in an interface display tool class manager (e.g., fragment manager).
In a specific implementation, the interface display tool class may be obtained by creating a class loader and by means of the class loader. Therefore, in a preferred mode, the method further comprises the following steps: create a class loader (e.g., ClassLoader); and acquiring the name of the interface display tool class corresponding to the theme pack, and loading the interface display tool class with the name corresponding to the theme pack by using the class loader. In order to display the tool class by using the class loader loading interface, a calling interface of the resource loading tool class needs to be provided, so that in a preferred embodiment, the method further includes: modifying an interface display tool class and an interface display tool class manager of an Android system or an Android system application in advance, thereby providing a calling interface of a resource loading tool class; and the class loader loads the interface display tool class with the corresponding name of the theme pack through the calling interface of the resource loading tool class.
S105: and if the theme switching type is to change the theme view, acquiring the view resource file in the theme pack, calling a view switching function, and updating the original view resource file in the Android system or the Android system application to the view resource file acquired from the theme pack.
And when the theme switching type is a theme change view only related to resource change (color and picture), replacing the view resource file of the original interface by calling the view resource file in the theme pack. Specifically, the interface can be refreshed by calling a View-related interface. For example, when a theme switching function in View is called, the function may obtain a corresponding resource name according to the resource ID, and then obtain a resource corresponding to the theme pack according to the name, for example: pictures, colors, etc. And calling a View switching function of View to realize resource replacement and refreshing.
Referring to fig. 2, a flowchart of a theme switching method according to another embodiment of the present invention is shown. In this embodiment, the logical relationship of each step is described in detail, and the details of implementation of the topic switching type branch that changes the topic layout are described in detail.
S201: and receiving a theme switching request initiated by a user, and analyzing the theme switching request to acquire related information of a switching theme.
The related information of the switching theme at least comprises a theme switching type and a theme identifier, wherein the theme switching type indicates whether the theme layout or the theme view is changed, and the theme identifier can be a theme name or a theme ID.
S202: and detecting whether the current Android system or APP supports the theme or not according to the theme identifier, if not, ending, and prompting the user that the theme is not supported. If so, the next operation is carried out.
The theme supported by the Android system APP can be listed on a user setting interface, and the user can select different themes according to own preference. For example: musical themes, weather themes, cartoon themes, etc.
S203: according to the theme identification, obtaining the theme pack and performing initialization work of related resources, for example: creating a view resource class (such as ISCRResource) or a class loader (such as ClassLoader), and informing Activity (a tool class provided by Android, which is an entry of each interface and is a component in APP) to do relevant interface refreshing work.
After the theme pack is obtained, a corresponding resource management class (such as ISCSResource and ClassLoader) is initialized according to the theme pack and points to a path where the theme pack resources are located, and when the tool class is called, the tool class obtains related resources for the used path.
S204: and judging whether the user switches the type of the theme, namely only changing the theme view or changing the theme layout. If it is a change of the subject layout, the branches S205-S207 are executed, and if the subject view is changed, the branch S208 is executed.
S205: and acquiring the name of the corresponding SCFragment in the theme pack.
S206: and loading the SCFragment with the corresponding name by using ClassLoader, acquiring an object of the SCFragment, and calling the corresponding resource file in the theme package in the SCFragment.
S207: call replace function of fragment manager in Activity to replace SCfragment.
S208: and calling a View related interface to refresh the interface. For example, when a theme switching function in View is called, the function may obtain a corresponding resource name according to the resource ID, and then obtain a resource corresponding to the theme pack according to the name, for example: pictures, colors, etc. And calling a function of setting resources of the View to realize resource replacement and refreshing.
S209: and completing theme switching and presenting a brand new display interface for the user.
The embodiments of the present invention are described above in connection with fig. 1-2 from the perspective of the operational flow of the handover topic. Embodiments of the present invention are described below from an object-oriented programming perspective.
The embodiment of the invention constructs a rapid theme scheme based on an Android system, and relates to the following operations from the aspect of object-oriented program design.
S1: and modifying a control system provided by the Android system, storing the resource ID (Identity, unique identifier) set in the control configuration file, and adding a theme changing interface to re-acquire the resource refreshing interface corresponding to the theme pack by using the stored resource ID (Identity, unique identifier).
S2: providing an interface for acquiring a resource acquisition tool class related to a theme, and providing a method for acquiring a corresponding resource tool by a package name, for example: AssetManager (a tool class for acquiring Resources provided by Android), ClassLoader (a tool class for adding a class file in a java program provided by Android), and Resources (a tool class for acquiring corresponding Resources according to a resource ID provided by Android).
S3: the interface inherits fragment activity (a tool class provided by Android, which is an entry for each interface) and implements the interface provided by S2 is provided.
S4: providing a Resource management interface and providing two implementation classes of the interface, wherein the function of the interface directs the Resource to the Resource package where the corresponding theme is located.
The implementation is of the type one: for the case where only the color and picture resources in the theme are changed (changing the theme view).
The implementation is of the type two: for the case where a layout change occurs in a theme (change theme layout).
S5: a new implementation class of Context (Android provided interface that provides a method to get related resource tool classes) is provided. And saving the object of the S3, and calling the related interface of the S2 to acquire the related resource loading tool class.
S6: modifying the Android system Fragment (a tool class for interface display provided by Android) and the Fragment manager (a management class for Fragment provided by Android), providing a method for setting and acquiring the implementation class of the Context in the S5, and acquiring resource classes used by different theme pairs by using the method.
S7: provides a class that inherits fragments and provides a method to get and set the Context new implementation class object in S5.
S8: providing a tool class inheriting Application (classes provided by Android, wherein when each APP is started, the class is started first), storing related information of the theme in the class and initializing related resources. And providing an interface for acquiring related resources, calling by different classes in the APP and receiving a theme change notification.
S9: all Activities in the APP need to inherit the class provided by the S3 and realize the abstract method provided by the APP, and the Activities serve as a container, and the Activities can obtain different Fragment names according to different subjects and enable the method for obtaining ClassLoader provided in the S2 to obtain ClassLoader to load the Fragment. The corresponding Fragment in the theme pack needs to inherit the base class that inherits the Fragment provided in S6.
S10: and the user enters a theme setting interface, selects a certain theme and completes theme switching.
Referring to fig. 3, a schematic diagram of inheritance and call relations of various classes and interfaces according to another embodiment of the present invention is shown.
The main classes and interfaces involved are described below.
1. The interface SCCtxThemeInterface provides an interface for acquiring a resource acquisition tool class related to a topic, and provides a method for acquiring a corresponding resource tool by a package name, for example: AssetManager (a tool class for acquiring Resources provided by Android), ClassLoader (a tool class for adding a class file in a java program provided by Android), and Resources (a tool class for acquiring corresponding Resources according to a resource ID provided by Android).
2. The class SCBaseActivity inherits fragment activity (a tool class provided by Android, which is an inlet of each interface) and realizes an interface provided by SCCtxThemeInterface.
3. The interface ISCROURCE provides a Resource management interface and provides two implementation classes of the interface, and the function of the interface directs the Resource to the Resource package where the corresponding theme is located.
Implementation class scrource: for the case that only the color and picture resources in the theme are changed.
Implementation of SCLayoutResource-like: for the case where a layout change occurs in a theme.
4. Class SCContext provides a new implementation class for Context (an interface provided by Android, which provides a method to obtain related resource tool classes). And storing the object of the ISCSResource, and calling the SCCtxThemeInterface related interface to acquire the related resource loading tool class.
5. The class SCFragment provides a method for setting and obtaining the SCContext object, and obtains resource classes used by different theme pairs by using the method.
6. The SCBaseapplication class stores the related information of the theme in the class and initializes the related resources. And providing an interface for acquiring related resources, calling by different classes in the APP and receiving a theme change notification.
7. All Activities in APP need to inherit the SCBaseActivities and realize the abstract method provided by the SCBaseActivities, and the Activities serve as a container, and the Activities can obtain different SCFragments according to different subjects and make the method for obtaining ClassLoader provided by SCCtxThemeInterface obtain ClassLoader to load the SCFragments.
The classes and interfaces involved are explained below:
SC: smart Car, Intelligent Car.
SCCtxThemeInterface: smart Car Context subject Interface.
ClassLoader: a class loader.
SCFragment: smart Car Fragment: intelligent vehicle segment.
ISCSResource: interface Smart Car Resource: and (4) intelligent vehicle resource interface.
SCResource: smart Car Resource: intelligent vehicle resource.
SCCayoutResource: smart Car Layout Resource: intelligent vehicle layout resource class.
SCBaseapplication: smart Car Base Application: and (4) intelligent vehicle basic application.
SCBaseActivity: smart Car Base Activity: intelligent vehicle basic activities.
SCContext: smart Car Context: context class of intelligent vehicle
The following describes an exemplary embodiment of the present invention with reference to a specific application scenario.
For example, in a mobile phone APP (in-vehicle intelligent system APP), a plurality of sets of themes need to be provided, and a theme scheme most suitable for the self style is selected by a user, and the themes can be updated online. After a set of themes are selected, the APP firstly judges whether the theme exists locally or not, if yes, the APP informs a theme switching system to switch the themes, if not, the APP downloads the themes from the internet, and after the downloading is finished, the APP informs the theme switching system (the functional system for realizing the scheme of the invention) to switch the themes. The theme switching process can be referred to the above-mentioned process shown in fig. 2.
Therefore, the embodiment of the invention provides a theme switching scheme aiming at the defect that the theme layout cannot be changed in the prior art, and achieves the purpose of changing the theme layout by obtaining the theme package and calling the layout resource file in the theme package through the interface display tool. According to the method and the device, the rapid theme switching can be realized by calling the layout resource file in the preset theme pack. The method and the device can change the theme of the Android system and the themes of various APPs installed under the Android system, and bring fundamental brand new experience to users particularly through the change of theme layout. Of course, the embodiment of the invention can also realize the situation of changing the theme view, and achieve the purpose of changing the theme picture and color by calling the view resource file in the theme pack.
Corresponding to the method, the embodiment of the invention also provides a theme switching device, which is used for switching the theme of the Android system or the Android system application. The device can be intelligent terminal equipment itself, can also be a functional entity in the terminal, and can be realized by software, hardware or a combination of software and hardware.
Fig. 4 is a schematic diagram of the structure of the device. The theme switching apparatus 400 includes:
a topic switching request processing unit 401, configured to receive and analyze a topic switching request, and obtain a topic switching type and a topic identifier;
a theme pack acquiring unit 402, configured to acquire a theme pack corresponding to the theme identifier;
the theme change layout processing unit 403 is configured to obtain an interface display tool class corresponding to a theme pack, call a layout resource file in the theme pack through the interface display tool class, and call a replacement function in an interface display tool class manager, to update an original interface display tool class in the Android system or the Android system application to the interface display tool class that has called the layout resource file in the theme pack.
In one embodiment, the apparatus further comprises:
a change theme view processing unit 404, configured to obtain the view resource file in the theme pack, and invoke a view switching function to update the original view resource file in the Android system or the Android system application to the view resource file obtained from the theme pack.
In one embodiment, the apparatus further comprises:
a class loader creating unit 405 for creating a class loader;
the theme change layout processing unit 403 is further configured to obtain a name of an interface display tool class corresponding to the theme pack, and load the interface display tool class with the name corresponding to the theme pack by using the class loader.
In one embodiment, the apparatus further comprises:
a calling interface providing unit 406 for loading a tool class, configured to modify an interface display tool class and an interface display tool class manager of the Android system or the Android system application in advance, so as to provide a calling interface of a resource loading tool class;
and the class loader loads the interface display tool class with the name corresponding to the theme pack through the calling interface of the resource loading tool class.
In one embodiment, the apparatus further comprises:
a theme pack creating unit 407, configured to create the theme pack, where the theme pack includes a layout resource file and/or a view resource file, and the theme pack is stored locally in the terminal where the Android system is located or stored on a network side.
In one embodiment, the apparatus further comprises:
an application tool class inheriting unit 408, configured to inherit the application tool class in advance, store the theme related information in the application tool class, initialize the theme related resource, and complete creating the theme pack.
Corresponding to the method and the device, the embodiment of the invention further provides a vehicle control system, which comprises an intelligent vehicle and a terminal for controlling the intelligent vehicle, wherein an operating system of the terminal is an Android system, and particularly, the terminal comprises the theme switching device shown in fig. 4.
Referring to fig. 5, the vehicle control system 500 includes a smart vehicle 501 and a smart vehicle control terminal 502, wherein the smart vehicle control terminal 502 includes a theme switching apparatus 400 therein. Specifically, please refer to fig. 4 and the related description for internal functional modules of the theme switching apparatus 400.
The embodiment of the invention also provides a vehicle.
Fig. 6 shows a block diagram of a vehicle according to an embodiment of the present invention, which may include, as shown in fig. 6: a central control module, a dashboard 610, a vehicle data recorder 611, a HUD (Head Up Display) Head-Up Display 612, an intelligent in-vehicle infotainment system 613, and an intelligent driving module 613.
Dashboard 610 has a 12.3 inch LCD display device, which may be implemented with the TI J6 CPU; the operating system of the dashboard may be based on a QNX embedded system, and the dashboard may be used to display vehicle status including speed, rotational speed, electrical quantity, tire pressure, vehicle parking, gear, etc., a map, vehicle navigation information, vehicle music play, etc. The HUD heads-up display 612 may display GPS navigation information, navigation path information, time information, and the like.
In one embodiment, the smart driving module 614 may be used to process operations related to smart driving, and the smart driving module 614 may include Advanced Driver Assistance Systems (ADAS), active safety Systems, Attention Assistance Systems (AAS), Fatigue Warning Systems (FWS), Vehicle intelligent Acoustic alert Systems (AVAS), and the like. The vehicle can be intelligently driven by combining an ADAS system and the like, and the intelligent driving can be completely unmanned driving or can be advanced auxiliary driving functions such as auxiliary merging and lane deviation for driving control of a driver.
The central control device can be composed of a plurality of modules, and mainly comprises: a main board 601; a Serial Advanced Technology Attachment (SATA) module 602 connected to a storage device such as SSD603, which may be used to store data information; an AM (Amplitude Modulation)/FM (Frequency Modulation) module 604 for providing the vehicle with a radio function; a power amplifier module 605 for processing sound; a WIFI (Wireless-Fidelity)/Bluetooth module 606 for providing WIFI/Bluetooth service for the vehicle; an LTE (long term Evolution ) communication module 607 for providing a communication function with a telecommunications carrier for a vehicle; a power module 608, wherein the power module 608 provides power for the central control device; the Switch switching module 609 can be used as an expandable interface to connect various sensors, for example, a night vision function sensor and a PM2.5 function sensor if needed, and can be connected to a main board of the central control device through the Switch switching module 609, so that a processor of the central control device processes data and transmits the data to a central control display.
In one embodiment, the vehicle further includes a look-around camera, an ADAS camera, a night vision camera, a millimeter wave radar, an ultrasonic radar, an ESR radar, or the like. After the vehicle hardware is produced, the intelligent driving related hardware is mounted, and in the later stage, the automatic driving related functions can be completed by using the hardware through OTA (over the air) upgrading.
In one embodiment, the vehicle's smart in-vehicle infotainment system 613 includes the theme switching device shown in FIG. 4. Specifically, please refer to fig. 4 and the related description for internal functional modules of the theme switching apparatus 400.
The embodiment of the invention also provides an intelligent vehicle-mounted information entertainment system. The system can provide functions of vehicle control, navigation, music, browser, WeChat, vehicle setting and the like. It will be appreciated that the intelligent in-vehicle infotainment system is typically incorporated in a vehicle as shown in fig. 5. Specifically, the intelligent in-vehicle infotainment system includes the theme switching apparatus 400 shown in fig. 4, and please refer to fig. 4 and the related description for internal functional modules of the theme switching apparatus 400.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The method and apparatus of the present invention may be implemented in a number of ways. For example, the methods and apparatus of the present invention may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (13)

1. A theme switching method is used for switching themes of an Android system or an Android system application, and comprises the following steps:
receiving and analyzing a theme switching request to obtain a theme switching type and a theme identifier;
obtaining a theme pack corresponding to the theme identification;
if the theme switching type is to change the theme layout, a class loader is created, the name of an interface display tool class corresponding to the theme pack is obtained, the interface display tool class corresponding to the name of the theme pack is loaded by the class loader, the layout resource file in the theme pack is called through the interface display tool class, a replacement function in an interface display tool class manager is called, and the original interface display tool class in the Android system or the Android system application is updated to the interface display tool class calling the layout resource file in the theme pack.
2. The method of claim 1, further comprising:
and if the theme switching type is to change the theme view, acquiring the view resource file in the theme pack, calling a view switching function, and updating the original view resource file in the Android system or the Android system application to the view resource file acquired from the theme pack.
3. The method of claim 2, further comprising: modifying the interface display tool class and the interface display tool class manager of the Android system or the Android system application in advance, thereby providing a calling interface of the resource loading tool class;
and the class loader loads the interface display tool class with the name corresponding to the theme pack through the calling interface of the resource loading tool class.
4. The method of claim 1, further comprising:
creating the theme pack, wherein the theme pack comprises a layout resource file and/or a view resource file;
and storing the theme pack locally at the terminal where the Android system is located, or storing the theme pack at a network side.
5. The method of claim 4, further comprising:
inheriting an application tool class in advance, saving theme related information in the application tool class, initializing theme related resources, and completing creation of the theme pack.
6. A theme switching device is used for switching themes of an Android system or an Android system application, and comprises:
the theme switching request processing unit is used for receiving and analyzing the theme switching request to obtain a theme switching type and a theme identifier;
the theme pack acquisition unit is used for acquiring a theme pack corresponding to the theme identification;
a class loader creating unit for creating a class loader;
and the theme layout change processing unit is used for acquiring the name of an interface display tool class corresponding to the theme pack, loading the interface display tool class corresponding to the name of the theme pack by using the class loader, calling the layout resource file in the theme pack through the interface display tool class, calling a replacement function in an interface display tool class manager, and updating the original interface display tool class in the Android system or the Android system application into the interface display tool class calling the layout resource file in the theme pack.
7. The apparatus of claim 6, further comprising:
and the change theme view processing unit is used for acquiring the view resource file in the theme pack, calling a view switching function, and updating the original view resource file in the Android system or the Android system application into the view resource file acquired from the theme pack.
8. The apparatus of claim 6, further comprising: the calling interface providing unit is used for modifying the interface display tool class and the interface display tool class manager of the Android system or the Android system application in advance so as to provide a calling interface of the resource loading tool class;
and the class loader loads the interface display tool class with the name corresponding to the theme pack through the calling interface of the resource loading tool class.
9. The apparatus of claim 6, further comprising:
and the theme pack creating unit is used for creating the theme pack, wherein the theme pack comprises a layout resource file and/or a view resource file, and the theme pack is stored in the local terminal of the Android system or in the network side.
10. The apparatus of claim 9, further comprising:
and the application tool class inheritance unit is used for inheriting the application tool class in advance, storing the theme related information in the application tool class and initializing the theme related resources to complete the creation of the theme package.
11. An intelligent in-vehicle infotainment system for controlling an intelligent vehicle, characterized in that the system comprises a theme switching apparatus according to any one of claims 6 to 10.
12. A vehicle, comprising: the intelligent vehicle-mounted information entertainment system comprises a central control module, an instrument panel, a driving recorder, a HUD head-up display, an intelligent vehicle-mounted information entertainment system and an intelligent driving module, and is characterized in that the intelligent vehicle-mounted information entertainment system comprises the theme switching device as claimed in any one of claims 6 to 10.
13. A vehicle control system, comprising a smart vehicle and a terminal for controlling the smart vehicle, wherein an operating system of the terminal is an Android system, and the terminal comprises the theme switching apparatus according to any one of claims 6 to 10.
CN201611184086.3A 2016-12-20 2016-12-20 Theme switching method, device, vehicle and system Active CN106802794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611184086.3A CN106802794B (en) 2016-12-20 2016-12-20 Theme switching method, device, vehicle and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611184086.3A CN106802794B (en) 2016-12-20 2016-12-20 Theme switching method, device, vehicle and system

Publications (2)

Publication Number Publication Date
CN106802794A CN106802794A (en) 2017-06-06
CN106802794B true CN106802794B (en) 2020-06-16

Family

ID=58985019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611184086.3A Active CN106802794B (en) 2016-12-20 2016-12-20 Theme switching method, device, vehicle and system

Country Status (1)

Country Link
CN (1) CN106802794B (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108657070A (en) * 2018-03-30 2018-10-16 斑马网络技术有限公司 Automobile image interactive system and its method
CN108769128A (en) * 2018-05-02 2018-11-06 智车优行科技(北京)有限公司 Vehicular meter interface subject display system, method and middle control, instrument terminal installation
CN110908564B (en) * 2018-09-17 2023-04-07 重庆长安汽车股份有限公司 Automobile display terminal and theme switching method
CN111131352B (en) * 2018-10-31 2023-01-13 北京国双科技有限公司 Theme switching method and device
CN110018866B (en) * 2018-11-06 2022-03-15 蔚来(安徽)控股有限公司 User interface theme updating method, device and system, vehicle machine and vehicle
CN109542579A (en) * 2018-12-18 2019-03-29 广州路派电子科技有限公司 A kind of dynamic creation panorama is parked the method for image system UI
CN109739600B (en) * 2018-12-26 2022-02-25 网易传媒科技(北京)有限公司 Data processing method, medium, device and computing equipment
CN109684020B (en) * 2018-12-27 2023-08-11 努比亚技术有限公司 Theme switching method, device and computer readable storage medium
CN109918121B (en) * 2019-02-22 2022-08-30 深圳市酷开网络科技股份有限公司 Configuration method based on different chip schemes, intelligent terminal and storage medium
CN111949340A (en) * 2019-05-14 2020-11-17 上海博泰悦臻网络技术服务有限公司 Vehicle body style automatic switching method and device, readable storage medium and terminal
CN110377375B (en) * 2019-05-31 2023-10-27 深圳赛安特技术服务有限公司 App theme switching method and device and computer readable storage medium
CN110308961B (en) * 2019-07-02 2023-03-31 广州小鹏汽车科技有限公司 Theme scene switching method and device of vehicle-mounted terminal
CN110399130B (en) * 2019-07-16 2023-10-20 国金证券股份有限公司 APP skin changing method based on android system
CN110399196B (en) * 2019-07-30 2024-04-23 努比亚技术有限公司 Wearable device, interface switching implementation method thereof and computer readable storage medium
CN110471738B (en) * 2019-08-22 2023-01-10 北京字节跳动网络技术有限公司 Theme switching method and device of application program, electronic equipment and storage medium
CN110597441A (en) * 2019-09-12 2019-12-20 上海沣沅星科技有限公司 Method, device, terminal and medium for switching human-computer interaction interface and managing resources
CN111240792B (en) * 2020-02-10 2021-05-14 腾讯科技(深圳)有限公司 Theme switching method and device for user interface, terminal and storage medium
CN113407072A (en) * 2020-09-18 2021-09-17 一汽奔腾轿车有限公司 Vehicle-mounted machine theme self-defining system and method
CN112269605A (en) * 2020-11-12 2021-01-26 北京百度网讯科技有限公司 Skin replacement method and device, electronic equipment and storage medium
CN113315759B (en) * 2021-05-12 2023-07-14 恒大新能源汽车投资控股集团有限公司 Vehicle control method, vehicle and computer readable storage medium
CN114625459A (en) * 2022-02-23 2022-06-14 浙江百应科技有限公司 Method, system, device and medium for switching page theme style
CN117234623B (en) * 2023-11-16 2024-02-20 盛威时代科技股份有限公司 Page theme changing method and device of application program and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103472997A (en) * 2013-09-24 2013-12-25 沈阳美行科技有限公司 Method for automatically switching software interface display styles according to horizontal and vertical screens
CN104572280A (en) * 2014-12-29 2015-04-29 成都卓影科技有限公司 Method for switching Android application subject

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9354779B2 (en) * 2012-03-12 2016-05-31 Microsoft Technology Licensing, Llc Providing theme variations in a user interface
CN102984350A (en) * 2012-11-01 2013-03-20 广东欧珀移动通信有限公司 User-defined subject switchover method and device in mobile terminal of Android operating system
US20140325535A1 (en) * 2013-04-24 2014-10-30 Tencent Technology (Shenzhen) Company Limited Method of switching desktop subjects of mobile terminal and its switching apparatus
CN105549993B (en) * 2015-12-09 2019-07-09 Tcl集团股份有限公司 A kind of Android system resource switch method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103472997A (en) * 2013-09-24 2013-12-25 沈阳美行科技有限公司 Method for automatically switching software interface display styles according to horizontal and vertical screens
CN104572280A (en) * 2014-12-29 2015-04-29 成都卓影科技有限公司 Method for switching Android application subject

Also Published As

Publication number Publication date
CN106802794A (en) 2017-06-06

Similar Documents

Publication Publication Date Title
CN106802794B (en) Theme switching method, device, vehicle and system
EP3422751B1 (en) Downloading another sim profile in a device
US9428197B2 (en) Method and apparatus for persistent transferrable customizable vehicle settings
CN104765597B (en) For the method and system of application type user interface templates
US20160105540A1 (en) Apparatus and method for displaying user interface
CN104010281A (en) Hinting method and device of mobile equipment traffic
US9408244B2 (en) Multimedia terminal, control method thereof, and recording medium
CN105882415A (en) Method and apparatus for application management and control
US20140280439A1 (en) Method and Apparatus for Seamless Application Portability Over Multiple Environments
CN105677445A (en) Application installation managing method, device and intelligent terminal
CN111813601A (en) Micro-service rollback method and device for stateful distributed cluster
CN113961309A (en) Information processing method, information processing device, electronic equipment and computer storage medium
CN111137205A (en) Vehicle lamp control method, device and equipment
CN115643338A (en) Parameter updating method and equipment
CN107172118B (en) Control of primary connection device by vehicle computing platform and secondary connection device
CN112817677B (en) Theme switching method, system, equipment and storage medium for vehicle-mounted information entertainment system
CN106891830A (en) Control method, control device, mobile unit and transport facility
US9358886B2 (en) Method for configuring user interface of head unit of vehicle dynamically by using mobile terminal, and head unit and computer-readable recording media using the same
CN116737243B (en) Screen parameter patch upgrading method and terminal equipment
CN113970334A (en) Map rendering method, architecture, device and storage medium
CN114443117B (en) Custom package processing method and electronic equipment
CN111901798A (en) Login management method and device and computer storage medium
CN105740006A (en) Cross-platform service providing method of wearable intelligent device based on transparent computing
US10817238B2 (en) Systems and methods for determining application availability
CN113434164A (en) Method and system for updating configuration of setting item cloud of vehicle-mounted entertainment host

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant