CN102681827B - The method and apparatus that in Android system, the tab overall situation realizes - Google Patents

The method and apparatus that in Android system, the tab overall situation realizes Download PDF

Info

Publication number
CN102681827B
CN102681827B CN201110059435.XA CN201110059435A CN102681827B CN 102681827 B CN102681827 B CN 102681827B CN 201110059435 A CN201110059435 A CN 201110059435A CN 102681827 B CN102681827 B CN 102681827B
Authority
CN
China
Prior art keywords
activity
group
tab
movable
mark
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
CN201110059435.XA
Other languages
Chinese (zh)
Other versions
CN102681827A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201110059435.XA priority Critical patent/CN102681827B/en
Publication of CN102681827A publication Critical patent/CN102681827A/en
Application granted granted Critical
Publication of CN102681827B publication Critical patent/CN102681827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides the method and apparatus that in Android system, the tab overall situation realizes. Wherein, the method comprises: set up the first activity group, described the first activity group comprises at least one tab; The activity group set that foundation comprises at least one movable group; By associated with a tab in described the first activity group at least one the movable group in described movable group set; Corresponding when movable when adopting arbitrary tab in described the first activity group to start, the described activity starting is subordinated in the associated activity group of its corresponding tab. Adopt the present invention, can ensure that in Android system, the tab overall situation occurs, improve page display efficiency.

Description

The method and apparatus that in Android system, the tab overall situation realizes
Technical field
The present invention relates to Internet technology, the side that particularly in Android system, the tab overall situation realizesMethod and device.
Background technology
Android system is the mobile phone operating system that company of Google (Google) releases, in Android system,Tab is a kind of important expression forms of information, and it is mainly by TabActivity, TabHost and TabWidgetThree class compositions. Wherein, TabActivity inherits in activity group (ActivityGroup), is responsible for handing over userMutually, can move multiple activities (Activity) simultaneously and show multiple interfaces (View). Here Activity,For the class in Android system, be that Android system and user carry out mutual elementary cell, generally at handOn machine, show that a page is an Activity; ActivityGroup is the class of inheriting in Activity, itsCan move multiple Activity, and the plurality of Activity is managed; View is used in the interface representingHold and arrange. TabWidget is a control, and corresponding tab is responsible for the displaying at tab interface.
Page toggle control (TabHost), for realizing some inherent page switch logics. Popular nextSay, TabHost is equivalent to a container, has comprised TabWidget, the FrameLayout container of arranging.Wherein, the FrameLayout container of arranging is used for display page content. In addition, TabHost comprises inner classesTabSpec, wherein, TabSpec is mainly the setting of encapsulation option card and corresponding content of pages. In realityIn application, the newTabSpec method by TabHost can be using Activity or View as ginsengNumber imports into and constructs TabSpec, then will construct by interpolation (addTab) method of TabHostTabSpec join TabHost.
In Tab, tab and the page are one to one, will be corresponding in the time clicking a tabShow the page that this tab is corresponding, still, the page of this demonstration can cover tab, i.e. this demonstrationIn the page, no longer comprise tab, so, in the time that user wants to show the new page, just must be from currentThe page return to the page that does not cover before tab, reselect again afterwards tab with showThe page of wanting, this greatly reduces the efficiency that the page shows.
Summary of the invention
The invention provides the method and apparatus that in Android system, the tab overall situation realizes, to ensureIn Android system, the tab overall situation occurs, improves page display efficiency.
Technical scheme provided by the invention comprises:
The method that in Android system, the tab overall situation realizes, comprising:
Set up the first activity group, described the first activity group comprises at least one tab;
The activity group set that foundation comprises at least one movable group;
By at least one the movable group in the set of described activity group and a tab in described the first activity groupAssociated; Corresponding when movable when adopting arbitrary tab in described the first activity group to start, by the institute startingThe activity of stating is subordinated in the associated activity group of its corresponding tab.
The device that in Android system, the tab overall situation realizes, comprising:
First sets up unit, and for setting up the first activity group, described the first activity group comprises at least one tab;
Second sets up unit, for setting up the activity group set that comprises at least one movable group;
Associative cell, at least one movable group and described the first activity group that described activity group is gatheredA tab association; It is corresponding when movable when adopting arbitrary tab in described the first activity group to start,The described activity starting is subordinated in the associated activity group of its corresponding tab.
As can be seen from the above technical solutions, in the present invention, set up associated between activity group and tabRelation, when by tab startup activity, is subordinated to its corresponding tab by the activity of startup and closesIn the activity group of connection, also, between the activity of startup and activity group, there is subordinate relation, due to activity groupMiddle association tab, according to this subordinate relation, can obtain the equally also association tab of activity of startup,This can ensure that the tab overall situation occurs, so, in the time carrying out page jump, can be dependent on the work of startupTab on moving is carried out page jump, does not cover and need not need to not return to as prior artThe page of tab, this has improved page display efficiency greatly.
Brief description of the drawings
Fig. 1 is the flow chart of tab overall situation implementation method in Android system provided by the invention;
The schematic diagram of incidence relation between the activity group that Fig. 2 provides for the embodiment of the present invention and tab;
The structure drawing of device that Fig. 3 provides for the embodiment of the present invention.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing and concreteEmbodiment describes the present invention.
Fig. 1 is the flow chart of the method that in Android system provided by the invention, the tab overall situation realizes.As shown in Figure 1, the method can comprise the following steps:
Step 101, sets up the first activity group, and described the first activity group comprises at least one tab.
When this step 101 specific implementation, can comprise: set up a class of inheriting TabActivity, and arrangeTab is in described class. Also, the total Options card in described the first activity group is included in this foundationIn TabActivity class.
Step 102, sets up the activity group set that comprises at least one movable group.
Each activity group in the set of activity group is separate.
Step 103, by one at least one the movable group in the set of activity group and described the first activity groupIndividual tab association.
When this step 103 specific implementation, can comprise: for each tab is set up in the set of succession activity group extremelyThe class of a few movable group, joins TabHost by the addTab method of TabHost by such.
Step 104, corresponding when movable when adopting arbitrary tab in described the first activity group to start,The described activity starting is subordinated in the associated activity group of its corresponding tab.
In this step 104, the activity of startup is subordinated in the associated activity group of its corresponding tab and is wrappedDraw together: be the activity allocation identification (Id) of this startup, record mark that this activity is assigned with to this activity correspondenceIn the associated activity group of tab.
Wherein, this step 104 can start by activity the method startup activity of (startActivity), toolBody is: import the method to startActivity using the mark of this activity as parameter into, thereby start this activity.
It should be noted that, in the present embodiment, import into movable mark as parameter toAfter startActivity method startup activity, the View of the activity correspondence that the system that can receive is returned, so,In step 104, when the View of the activity correspondence of returning when the system of receiving, by the View of this activity correspondenceReplace View corresponding to current active.
Also it should be noted that, in the present embodiment, in each activity group in the set of management activity groupActivity, need for each activity group in movable group set arrange an identification list, this identification list is usedIn depositing movable mark. Be applied to, the identification list arranging for each movable group is initiallyTime the activity mark that comprises number be 0.
Based on this, in step 104, for the activity allocation identification starting comprises: by right the activity of this startupThe movable total value that in the associated activity group of the tab of answering, identification list has comprised is as this startupMovable mark, and distribute to this activity. Correspondingly, in step 104, the mark that record activity is assigned withKnowledge to the associated activity group of the tab of this activity correspondence comprises: record the mark that this activity is assigned withTo the identification list of the associated activity group of the tab of this activity correspondence.
So far, complete the flow process shown in Fig. 1.
In above-mentioned flow process, can find out based on step 103, the present invention is not closed activity and tabConnection, but activity group and tab are carried out associated, Fig. 2 shows the pass between tab and activity groupConnection relation. In Fig. 2, be laterally the first activity group, be longitudinally movable group set, wherein, activity groupIn set, each activity group has comprised identification list, comprises at least one Activity in each identification listMark. Fig. 2 shows activity group in movable group set and the tab in the first activity group is closed one by oneConnection, has formed two-way activity group chain.
It should be noted that, in the present embodiment, tab is associated with movable group, be in fact according to choosingItem card delimited user and operated link, and, due to the associated different activity group of different tab, therefore,Can obtaining user corresponding to different tab, to operate link be relatively independent.
In addition, in the flow process shown in Fig. 1, when by arbitrary tab from current in active stateMovable (being designated as the first activity) returned to the opened activity in inactive state before and (is designated as secondMovable) time, following steps can be carried out: the mark according to the second activity starts the second activity, this startup sideThe method starting in method and step 102 is similar, destroys the first activity and the first activity to the second activityBetween opened all activities, this destruction mode can be destroyed by activity (destroyActivity) methodRealize, and in the activity mark that each movable group has recorded from the set of activity group, delete the mark of the first activityThe mark of opened all activities between knowledge and the first activity to the second activity. Here, whyDelete the mark of all activities opened between the mark of the first activity and the first activity to the second activityKnow, main purpose is in order to save memory source.
In addition, in the flow process shown in Fig. 1, when user adopts the tab pair in described the first activity groupWhen setting operation is carried out in the activity starting, first the event that described setting operation is corresponding is distributed to this optionBlock associated activity group, described event distributed to this activity according to the mark of this activity by this activity group,By event described in this active process. This encapsulation event having realized in Android system distributes function.
The method above embodiment of the present invention being provided is described.
As can be seen from the above technical solutions, in the present invention, set up associated between activity group and tabRelation, when by tab startup activity, is subordinated to its corresponding tab by the activity of startup and closesIn the activity group of connection, also, between the activity of startup and activity group, there is subordinate relation. Due to activity groupMiddle association tab, according to this subordinate relation, can obtain the equally also association tab of activity of startup,This can ensure that the tab overall situation occurs, so, in the time carrying out page jump, can be dependent on the work of startupTab on moving is carried out page jump, does not cover and need not need to not return to as prior artThe page of tab, this has improved page display efficiency greatly.
The device below embodiment of the present invention being provided is described.
Referring to Fig. 3, the structure drawing of device that Fig. 3 provides for the embodiment of the present invention. As shown in Figure 3, this dressPut and comprise:
First sets up unit, and for setting up the first activity group, described the first activity group comprises at least one tab;
Second sets up unit, for setting up the activity group set that comprises at least one movable group;
Associative cell, at least one movable group and described the first activity group that described activity group is gatheredA tab association; It is corresponding when movable when adopting arbitrary tab in described the first activity group to start,The described activity starting is subordinated in the associated activity group of its corresponding tab.
In the present embodiment, as shown in Figure 3, when described associative cell specific implementation, can comprise following two subelements:
Distribute subelement, be used to the activity allocation identification of this startup;
Record subelement, associated to the tab of this activity correspondence for recording the mark that this activity is assigned withIn activity group.
In the present embodiment, as shown in Figure 3, described device further comprises: jump-transfer unit, setting unit and groupBill unit.
Wherein, jump-transfer unit, adopts arbitrary tab of described the first activity group from current residing for working asThe first activity is before returning opened second when movable, according to the mark of described the second activity start this secondActivity, destroys opened all activities between the first activity and the first activity to the second activity, and fromIn the activity mark that in described movable group set, each movable group has recorded, delete the first activity mark andThe mark of opened all activities between the first activity to the second activity.
Setting unit, in each activity group of described movable group set, an identification list being set, usesOrganize in depositing this activity the movable mark that associated tab starts; Based on this, described distribution subelementMovable for what activity group the identification list associated tab of the activity correspondence of this startup had been comprisedTotal value is as the movable mark of this startup, and distributes to this activity; The described subelement that records is for recordThe mark that this activity is assigned with is to the identification list of the associated activity group of the tab of this activity correspondence.
Dispatch unit, for carrying out and set behaviour the activity starting when the tab that adopts described the first activity groupWhile work, first the event that described setting operation is corresponding is distributed the activity group to this tab association, is lived by thisMoving group distributes described event to this activity according to the mark of this activity, by event described in this active process.
So far, complete the unit describe that the embodiment of the present invention provides.
As can be seen from the above technical solutions, in the present invention, set up associated between activity group and tabRelation, when by tab startup activity, is subordinated to its corresponding tab by the activity of startup and closesIn the activity group of connection, also, between the activity of startup and activity group, there is subordinate relation, due to activity groupMiddle association tab, according to this subordinate relation, can obtain the equally also association tab of activity of startup,This can ensure that the tab overall situation occurs, so, in the time carrying out page jump, can be dependent on the work of startupTab on moving is carried out page jump, does not cover and need not need to not return to as prior artThe page of tab, this has improved page display efficiency greatly.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all at thisWithin the spirit and principle of invention, any amendment of making, be equal to replacement, improvement etc., all should be included inWithin the scope of protection of the invention.

Claims (11)

1. the method that in Android system, the tab overall situation realizes, is characterized in that, the method comprises:
Set up the first movable group ActivityGroup, described the first activity group comprises at least one tab;
The activity group set that foundation comprises at least one movable group;
By at least one the movable group in the set of described activity group and a tab in described the first activity groupAssociated;
In the time that the arbitrary tab in described the first activity group of employing starts corresponding movable Activity, will startDescribed activity be subordinated in the associated activity group of its corresponding tab.
2. method according to claim 1, is characterized in that, the described activity by startup is subordinated to itThe corresponding associated activity group of tab comprises:
For the activity allocation identification of this startup, record mark that this activity the is assigned with tab to this activity correspondenceIn associated activity group.
3. method according to claim 2, is characterized in that, when adopting in described the first activity groupWhen arbitrary tab is returned to the second before opened activity from current residing the first activity, the method enters oneStep comprises:
Mark according to described the second activity starts this second activity, destroys first movable and the first activity to theOpened all activities between two activities, and the work that each movable group has recorded from described movable group setIn moving mark, delete opened all activities between the mark of the first activity and the first activity to the second activityMark.
4. method according to claim 2, is characterized in that, the method further comprises: describedIn each activity group in movable group set, an identification list is set, organizes associated choosing for depositing this activityThe movable mark that item card starts;
The described activity allocation identification for startup comprises: by the associated work of tab of the activity correspondence of this startupThe movable total value that in moving group, identification list has comprised is as the movable mark of this startup, and distributes to thisMovable;
The mark that described record activity is assigned with to the associated activity group of the tab of this activity correspondence comprises:Record mark that this activity the is assigned with identification list to the associated activity group of the tab of this activity correspondenceIn.
5. method according to claim 2, is characterized in that, the method further comprises:
In the time that the tab in described the first activity group of employing is carried out setting operation to the activity starting, described settingOperate corresponding event and be first distributed the activity group to this tab association, by this activity group according to this activityMark described event is distributed to this activity, by event described in this active process.
6. method according to claim 1, is characterized in that, the described first activity group of setting up comprises:
Set up a class of inheriting TabActivity, and setting options are stuck in described class;
Described by associated with a tab in the first activity group at least one the movable group in the set of activity groupComprise: set up at least one movable class of organizing in the set of succession activity group for each tab, cut by the pageSuch is joined TabHost by the interpolation addTab method of changing control TabHost.
7. the device that in Android system, the tab overall situation realizes, is characterized in that, this device comprises:
First sets up unit, and for setting up the first movable group ActivityGroup, described the first activity group comprisesAt least one tab;
Second sets up unit, for setting up the activity group set that comprises at least one movable group;
Associative cell, at least one movable group and described the first activity group that described activity group is gatheredA tab association; When adopting the arbitrary tab in described the first activity group to start corresponding activityWhen Activity, the described activity starting is subordinated in the associated activity group of its corresponding tab.
8. device according to claim 7, is characterized in that, described associative cell comprises:
Distribute subelement, be used to the activity allocation identification of this startup;
Record subelement, associated to the tab of this activity correspondence for recording the mark that this activity is assigned withIn activity group.
9. device according to claim 8, is characterized in that, described device further comprises:
Jump-transfer unit, for living from current residing first when the arbitrary tab that adopts described the first activity groupWhile moving the second activity opened before returning, start this second activity according to the mark of described the second activity,Destroy opened all activities between the first activity and the first activity to the second activity, and from described activityIn the activity mark that in group set, each movable group has recorded, delete the mark of the first activity and the first activity extremelyThe mark of opened all activities between the second activity.
10. device according to claim 8, is characterized in that, described device further comprises:
Setting unit, in each activity group of described movable group set, an identification list being set, usesOrganize in depositing this activity the movable mark that associated tab starts;
Described distribution subelement is for identifying activity the group associated tab of the activity correspondence of this startupThe movable total value that list has comprised is as the movable mark of this startup, and distributes to this activity;
The described subelement that records closes for mark to the tab of this activity correspondence that records this activity and be assigned withIn the identification list of the activity group of connection.
11. devices according to claim 8, is characterized in that, this device further comprises:
Dispatch unit, for carrying out and set behaviour the activity starting when the tab that adopts described the first activity groupWhile work, first the event that described setting operation is corresponding is distributed the activity group to this tab association, is lived by thisMoving group distributes described event to this activity according to the mark of this activity, by event described in this active process.
CN201110059435.XA 2011-03-11 2011-03-11 The method and apparatus that in Android system, the tab overall situation realizes Active CN102681827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110059435.XA CN102681827B (en) 2011-03-11 2011-03-11 The method and apparatus that in Android system, the tab overall situation realizes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110059435.XA CN102681827B (en) 2011-03-11 2011-03-11 The method and apparatus that in Android system, the tab overall situation realizes

Publications (2)

Publication Number Publication Date
CN102681827A CN102681827A (en) 2012-09-19
CN102681827B true CN102681827B (en) 2016-05-04

Family

ID=46813812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110059435.XA Active CN102681827B (en) 2011-03-11 2011-03-11 The method and apparatus that in Android system, the tab overall situation realizes

Country Status (1)

Country Link
CN (1) CN102681827B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617082B (en) * 2013-10-23 2016-09-28 北京奇虎科技有限公司 The means of communication and device between application based on suspension procedure plate
CN103617078A (en) * 2013-11-22 2014-03-05 北京奇虎科技有限公司 Method and device for managing active components
CN103745152B (en) * 2013-12-11 2017-02-22 深圳市欧珀通信软件有限公司 Advertisement shielding method and system based on mobile terminal
CN104503763A (en) * 2014-12-31 2015-04-08 深圳市航盛电子股份有限公司 Android label page and realization method thereof
CN106843912B (en) * 2017-03-22 2021-01-01 武汉斗鱼网络科技有限公司 Page information acquisition method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101390081A (en) * 2005-04-07 2009-03-18 微软公司 System and method for selecting a tab within a tabbed browser

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6801227B2 (en) * 2001-01-16 2004-10-05 Siemens Medical Solutions Health Services Inc. System and user interface supporting user navigation and concurrent application operation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101390081A (en) * 2005-04-07 2009-03-18 微软公司 System and method for selecting a tab within a tabbed browser

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TabHost中单个选项卡内的多个页面切换的问题;匿名;《CSDN论坛》;20110113;第1-6页 *

Also Published As

Publication number Publication date
CN102681827A (en) 2012-09-19

Similar Documents

Publication Publication Date Title
CN102681827B (en) The method and apparatus that in Android system, the tab overall situation realizes
CN102662664B (en) Interface animation realization method and system
CN104035703B (en) Change client, method and system that view is shown
JP2010532522A5 (en)
CN109669657B (en) Method and equipment for conducting remote document collaboration
CN107944284B (en) Method and system for internal security control of enterprise data
CN103106266A (en) Folder management and display method and mobile terminal based on android system
CN102707884B (en) Interactive tool display method, interactive data acquiring method and terminal
CN102968438B (en) History data store control system in comprehensive monitoring system
CN102402560A (en) Method and system for commenting pictures in individual dynamic messages of SNS (social networking service) community
CN104572813A (en) Report generation method and device
CN103793313B (en) A kind of mobile terminal fault recording method and its system
CN103279349A (en) Mobile phone or PDA multi-window browsing system based on moving middleware
CN107423404A (en) Flow instance data synchronizing processing method and device
CN104158720A (en) Chatting record clearing method and system, and mobile terminal
CN104035705B (en) Client, the method and system of switch view display pattern
CN101281465B (en) Method for managing picture mark of mobile terminal
CN103823641A (en) Online expanded virtual volume system and realizing method thereof
CN105988863A (en) Event processing method and device
CN102609477A (en) Method for implementing serial number generator
CN104049724A (en) Sound generating method and device for touch control event
CN104484212A (en) Method and device for installing and deleting external storage files
CN104572893B (en) A kind of data mixing storage method in database
Sarrab et al. Selection criteria of open source software: First stage for adoption
CN102780780A (en) Method, equipment and system for data processing in cloud computing mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant