CN103345427A - View switching system and method based on Android message handling mechanism - Google Patents
View switching system and method based on Android message handling mechanism Download PDFInfo
- Publication number
- CN103345427A CN103345427A CN2013102948589A CN201310294858A CN103345427A CN 103345427 A CN103345427 A CN 103345427A CN 2013102948589 A CN2013102948589 A CN 2013102948589A CN 201310294858 A CN201310294858 A CN 201310294858A CN 103345427 A CN103345427 A CN 103345427A
- Authority
- CN
- China
- Prior art keywords
- event
- view
- message
- android
- activity
- 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.)
- Pending
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a view switching system and method based on an Android message handling mechanism. The view switching system is mainly formed by the following modules including an event, an event message queue, an Android client side main thread, an event dispatcher, an Activity assembly, an updated view handling interface program and an Android view. The view switching method particularly includes the steps of polling the event message queue by the Android client side main thread to obtain the message event, taking out an event message from the event message queue, dispatching the event message to an Activity event handling interface by the event dispatcher, and then carrying out logical handling by the event handling interface provided by an Activity. According to the view switching system and method based on the Android message handling mechanism, the view switching function of an Android mobile phone and the view switching function of a handheld device with an Android handling system can be simply, rapidly and visually achieved, and the requirement of a user for the visualization effect of an application program is met.
Description
?
Technical field
The present invention relates to the system and method that a kind of view switches, particularly based on view switched system and the method for Android message processing facility, belong to moving communicating field.
Background technology
Along with mobile Internet constantly develops, and the universal use of android mobile phone and handheld device, the improving constantly of user demand of answering the user, the android client-side program also should possess some basic functions, such as the view handoff functionality, satisfy the demand of user's application programs effect of visualization.
Summary of the invention
Introduced the concept of a series of reduced forms in the summary of the invention part, this will further describe in the embodiment part.Summary of the invention part of the present invention does not also mean that key feature and the essential features that will attempt to limit technical scheme required for protection, does not more mean that the protection domain of attempting to determine technical scheme required for protection.
At above problem, the invention provides a kind of view switched system based on the Android message processing facility, also provide simultaneously and adopt this system to realize the method that view switches.
The technical solution used in the present invention is as follows:
A kind of view switched system based on the Android message processing facility mainly is made of following module:
1) event message: the cell-phone customer terminal message event comprises view update, application such as touch event;
2) event queue: the message queue that is used for depositing event message;
3) Android main thread: the master routine that the Android client application is carried out, it can the poll event formation obtain message event, and is carried out by the event dispense;
4) event: refer to message event, a kind of data structure of program definition, program is according to the Event triggered processing logic;
5) event distributor: be used for the event distribution, event is distributed in the Activity assembly, the event handling interface actuating logic that is provided by Activity is handled again;
6) Activity assembly: be used for managing android application program life cycle and navigation rollback function commonly used is provided, and the event handling interface is provided;
7) upgrade the view processor interface routine: this interface routine is included among the activity, is used for carrying out the view update processing logic, realizes that view switches;
8) Android view, namely the android customer interface is showed.
According to system of the present invention, client with resource data store in the client device internal memory.
According to the event update view processor interface routine of system of the present invention the view event message being handled to be specially provides a view component plant produced view component, and adds view component to view window.
View component according to system of the present invention can be tabulation, palace lattice, gallery.
Show whole client screen according to the view window of system of the present invention.
A kind of view changing method based on the Android message processing facility is characterized in that specifically may further comprise the steps:
A, client master routine polling message event queue;
B, take out event message from event queue;
C, send to Activity event handling interface by message distributor;
D, Activity event handling interface are carried out view and are switched.
The method according to this invention, described message event formation realizes synchronization mechanism, avoids the atomicity of message read-write queue operation.
The invention provides a kind of flexible, complete, high performance view switched system and method based on the Android message processing facility, realization android mobile phone that can simple quicklook and adopt the view handoff functionality of the handheld device of android disposal system satisfies the demand of user's application programs effect of visualization.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention reaches and explanation is used for explaining the present invention, does not constitute improper restriction of the present invention.In the accompanying drawings:
Fig. 1 is system architecture synoptic diagram of the present invention;
Fig. 2 is the inventive method schematic flow sheet;
Fig. 3 is that android client view constitutes structural representation.
Embodiment
In the following description, a large amount of concrete details have been provided in order to more thorough understanding of the invention is provided.Yet, it will be apparent to one skilled in the art that the present invention can need not one or more these details and implemented.In other example, for fear of obscuring with the present invention, be not described for technical characterictics more well known in the art.
In order thoroughly to understand the present invention, detailed details will be proposed in following description, obvious, execution of the present invention is not limited to the specific details that the technician of the communications field has the knack of.Preferred embodiment of the present invention is described in detail as follows, yet except these were described in detail, the present invention can also have other embodiments.
As shown in Figure 1, the invention provides a kind of view switched system based on the Android message processing facility, mainly comprise as lower module:
Event message 001: the cell-phone customer terminal message event, such as view update, touch event etc.
Event queue 002: the message queue that is used for depositing event message.
The master routine that Android main thread 003:Android client application is carried out, it can the poll event formation obtain message event, and is carried out by the event dispense.
Event 004: refer to message event, a kind of data structure of program definition, program is according to the Event triggered processing logic.
Event distributor 005: be used for the event distribution, event is distributed in the Activity assembly, the event handling interface actuating logic that is provided by Activity is handled again.
Activity assembly 006: be used for managing android application program life cycle and navigation rollback function commonly used is provided, and the event handling interface is provided.
Upgrade view processor interface routine 007: this interface routine is included among the activity, is used for carrying out the view update processing logic, realizes that view switches.
Android view 008:android customer interface is showed.
According to system of the present invention, client with resource data store in the client device internal memory.
According to the event update view processor interface routine of system of the present invention the view event message being handled to be specially provides a view component plant produced view component, and adds view component to view window.
View component according to system of the present invention can be tabulation, palace lattice, gallery.
Show whole client screen according to the view window of system of the present invention.
Simultaneously, the present invention also provides a kind of view changing method based on the Android message processing facility, as shown in Figure 2, specifically may further comprise the steps:
S001 client master routine polling message event queue.
S002 takes out event message from event queue.
S003 sends to Activity event handling interface by message distributor.
S004 Activity event handling interface is carried out view and is switched.
The method according to this invention, described message event formation realizes synchronization mechanism, avoids the atomicity of message read-write queue operation.
Fig. 3 has described android client view structure,
Comprise: view window 009: viewdata shows that style can be tabulation, palace lattice, gallery etc.View component 010: show whole client screen.
The present invention is illustrated by above-described embodiment, but should be understood that, above-described embodiment just is used for for example and illustrative purposes, but not is intended to the present invention is limited in the described scope of embodiments.It will be appreciated by persons skilled in the art that in addition the present invention is not limited to above-described embodiment, can also make more kinds of variants and modifications according to instruction of the present invention, these variants and modifications all drop in the present invention's scope required for protection.Protection scope of the present invention is defined by the appended claims and equivalent scope thereof.
Claims (7)
1. view switched system based on the Android message processing facility mainly is made of following module:
1) event message: the cell-phone customer terminal message event comprises view update, application such as touch event;
2) event queue: the message queue that is used for depositing event message;
3) Android main thread: the master routine that the Android client application is carried out, it can the poll event formation obtain message event, and is carried out by the event dispense;
4) event: refer to message event, a kind of data structure of program definition, program is according to the Event triggered processing logic;
5) event distributor: be used for the event distribution, event is distributed in the Activity assembly, the event handling interface actuating logic that is provided by Activity is handled again;
6) Activity assembly: be used for managing android application program life cycle and navigation rollback function commonly used is provided, and the event handling interface is provided;
7) upgrade the view processor interface routine: this interface routine is included among the activity, is used for carrying out the view update processing logic, realizes that view switches;
8) Android view, namely the android customer interface is showed.
2. system according to claim 1, it is characterized in that client with resource data store in the client device internal memory.
3. system according to claim 1, it is characterized in that described event update view processor interface routine is handled to be specially to the view event message provides a view component plant produced view component, and adds view component to view window.
4. system according to claim 3 is characterized in that described view component can be tabulation, palace lattice, gallery.
5. system according to claim 3 is characterized in that described view window shows whole client screen.
6. view changing method based on the Android message processing facility is characterized in that specifically may further comprise the steps:
A, client master routine polling message event queue;
B, take out event message from event queue;
C, send to Activity event handling interface by message distributor;
D, Activity event handling interface are carried out view and are switched.
7. method according to claim 6 is characterized in that described message event formation realizes synchronization mechanism, avoids the atomicity of message read-write queue operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013102948589A CN103345427A (en) | 2013-07-15 | 2013-07-15 | View switching system and method based on Android message handling mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013102948589A CN103345427A (en) | 2013-07-15 | 2013-07-15 | View switching system and method based on Android message handling mechanism |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103345427A true CN103345427A (en) | 2013-10-09 |
Family
ID=49280225
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013102948589A Pending CN103345427A (en) | 2013-07-15 | 2013-07-15 | View switching system and method based on Android message handling mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103345427A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103927180A (en) * | 2014-04-21 | 2014-07-16 | 广州市久邦数码科技有限公司 | Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system |
CN103970526A (en) * | 2013-11-21 | 2014-08-06 | 成都力淼科技有限公司 | Android based single-activity view switching technology |
CN104035768A (en) * | 2014-05-30 | 2014-09-10 | 四川长虹电器股份有限公司 | System and method for Android platform to be compatible with local code OpenGL program |
CN104063133A (en) * | 2014-06-30 | 2014-09-24 | 广州视源电子科技股份有限公司 | Method and system of one-key switchover of interfaces |
CN104219231A (en) * | 2014-08-25 | 2014-12-17 | 华中科技大学 | Multi-protocol communication framework and communication method based on Android system |
CN104503993A (en) * | 2014-12-04 | 2015-04-08 | 英业达科技有限公司 | Data polling system and method thereof for handheld device |
WO2016192328A1 (en) * | 2015-06-02 | 2016-12-08 | 上海斐讯数据通信技术有限公司 | Method for communicating between views in android system |
CN106708614A (en) * | 2016-11-21 | 2017-05-24 | 桂林远望智能通信科技有限公司 | Multi-thread creation system and method, and multi-thread processing system and method |
CN107656790A (en) * | 2017-09-29 | 2018-02-02 | 惠州Tcl移动通信有限公司 | A kind of switching method, storage medium and the mobile terminal at event handling interface |
CN109889455A (en) * | 2019-02-15 | 2019-06-14 | 浙江吉利汽车研究院有限公司 | A kind of real-time message processing device |
CN113076091A (en) * | 2021-06-07 | 2021-07-06 | 杭州普数软件有限公司 | View layer assembly replacing method and device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508675A (en) * | 2011-12-28 | 2012-06-20 | Tcl集团股份有限公司 | Response processing method and device for mouse motion based on android platform |
-
2013
- 2013-07-15 CN CN2013102948589A patent/CN103345427A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508675A (en) * | 2011-12-28 | 2012-06-20 | Tcl集团股份有限公司 | Response processing method and device for mouse motion based on android platform |
Non-Patent Citations (2)
Title |
---|
BYANDBY: "android线程 Handler Message Queue AsyncTask线程模型 线程交互 + 修改Button样式 示例 最终easy整合版", 《HTTP://BYANDBY.ITEYE.COM/BLOG/825071》, 26 November 2010 (2010-11-26) * |
张磊等: "Android在移动应用中的新特性与实现", 《中国科技论文在线》, 28 December 2012 (2012-12-28), pages 1 - 8 * |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103970526A (en) * | 2013-11-21 | 2014-08-06 | 成都力淼科技有限公司 | Android based single-activity view switching technology |
CN103927180B (en) * | 2014-04-21 | 2017-02-15 | 广州市久邦数码科技有限公司 | Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system |
CN103927180A (en) * | 2014-04-21 | 2014-07-16 | 广州市久邦数码科技有限公司 | Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system |
CN104035768B (en) * | 2014-05-30 | 2017-09-19 | 四川长虹电器股份有限公司 | The system and method for Android platform compatibility local code OpenGL programs |
CN104035768A (en) * | 2014-05-30 | 2014-09-10 | 四川长虹电器股份有限公司 | System and method for Android platform to be compatible with local code OpenGL program |
CN104063133A (en) * | 2014-06-30 | 2014-09-24 | 广州视源电子科技股份有限公司 | Method and system of one-key switchover of interfaces |
CN104219231A (en) * | 2014-08-25 | 2014-12-17 | 华中科技大学 | Multi-protocol communication framework and communication method based on Android system |
CN104503993A (en) * | 2014-12-04 | 2015-04-08 | 英业达科技有限公司 | Data polling system and method thereof for handheld device |
WO2016192328A1 (en) * | 2015-06-02 | 2016-12-08 | 上海斐讯数据通信技术有限公司 | Method for communicating between views in android system |
CN106708614A (en) * | 2016-11-21 | 2017-05-24 | 桂林远望智能通信科技有限公司 | Multi-thread creation system and method, and multi-thread processing system and method |
CN106708614B (en) * | 2016-11-21 | 2019-12-10 | 桂林远望智能通信科技有限公司 | multithreading creating system and method and multithreading processing system and method |
CN107656790A (en) * | 2017-09-29 | 2018-02-02 | 惠州Tcl移动通信有限公司 | A kind of switching method, storage medium and the mobile terminal at event handling interface |
CN109889455A (en) * | 2019-02-15 | 2019-06-14 | 浙江吉利汽车研究院有限公司 | A kind of real-time message processing device |
CN109889455B (en) * | 2019-02-15 | 2020-09-11 | 浙江吉利汽车研究院有限公司 | Real-time message processing device |
CN113076091A (en) * | 2021-06-07 | 2021-07-06 | 杭州普数软件有限公司 | View layer assembly replacing method and device |
CN113076091B (en) * | 2021-06-07 | 2021-09-14 | 杭州普数软件有限公司 | View layer assembly replacing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103345427A (en) | View switching system and method based on Android message handling mechanism | |
CN101194231B (en) | Techniques for setting events in a multi-threaded system | |
CN103425225B (en) | Application programmer in portable data device operating system and operation method thereof | |
CN110300328B (en) | Video playing control method and device and readable storage medium | |
CN107800546B (en) | Management method and device for broadcast messages | |
US8886787B2 (en) | Notification for a set of sessions using a single call issued from a connection pool | |
CN103297395A (en) | Achievement method, system and device of internet business | |
CN104967550A (en) | Method and apparatus for displaying unread messages | |
KR20150127095A (en) | Providing an unseen message count across devices | |
CN103870255A (en) | Method and apparatus for displaying floating component | |
CN108549534B (en) | Graphical user interface redrawing method, terminal device and computer-readable storage medium | |
CN103595566A (en) | Method and device for detecting idle IP addresses | |
CN107391274A (en) | The processing method and processing device of deferred information | |
CN110008027A (en) | Operation method, device, terminal and the storage medium of process | |
CN109658934B (en) | Method and device for controlling multimedia app through voice | |
CN101867647A (en) | Method and device for processing concurrency conflict in mobile terminal | |
US9467526B2 (en) | Network communication using intermediation processor | |
CN103034480B (en) | A kind of embedded system timer implementation method | |
US10521275B2 (en) | Asynchronous dispatcher for application framework | |
CN104063285A (en) | Message broadcast communication method based on vehicle-mounted software among modules in platform process | |
CN106896956B (en) | The implementation method of multi-point touch under one kind " road " system | |
CN113285886A (en) | Bandwidth allocation method and device, electronic equipment and readable storage medium | |
CN112817835A (en) | Performance data acquisition method and device, processor and electronic device | |
CN105159690B (en) | A kind of method and device of automatic synchronization user interface UI thread | |
CN111143066A (en) | Event processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20131009 |