CN102681827A - Method and device for overall achieving of tab in Android system - Google Patents

Method and device for overall achieving of tab in Android system Download PDF

Info

Publication number
CN102681827A
CN102681827A CN201110059435XA CN201110059435A CN102681827A CN 102681827 A CN102681827 A CN 102681827A CN 201110059435X A CN201110059435X A CN 201110059435XA CN 201110059435 A CN201110059435 A CN 201110059435A CN 102681827 A CN102681827 A CN 102681827A
Authority
CN
China
Prior art keywords
activity
active groups
tab
sign
active
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.)
Granted
Application number
CN201110059435XA
Other languages
Chinese (zh)
Other versions
CN102681827B (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

Images

Abstract

The invention provides a method and a device for overall achieving of a tab in an Android system. The method includes that a first activity group is built, and the first activity group comprises at least one tab; an activity group set comprising at least one activity group is built; at least one activity group in the activity group set is related to one tab in the first activity group; and when any one tab in the first activity group is used for starting a corresponding activity, the started activity is subject to an activity group related to a corresponding tab. By means of the method and the device for the overall achieving of the tab in the Android system, the tab in the Android system can be ensured to occur in overall mode, and page display efficiency is improved.

Description

The method and apparatus that the tab overall situation realizes in the Android system
Technical field
The present invention relates to Internet technology, the method and apparatus that particularly the tab overall situation realizes in the Android system.
Background technology
The Android system is the mobile phone operating system that company of Google (Google) releases, and in the Android system, Tab is a kind of important expression forms of information, and it mainly is made up of TabActivity, TabHost and three classes of TabWidget.Wherein, TabActivity inherits in active groups (ActivityGroup), is responsible for and user interactions, can move a plurality of activities (Activity) simultaneously and show a plurality of interfaces (View).Here, Activity is the class in the Android system, is that Android system and user carry out mutual elementary cell, shows on mobile phone that generally a page is an Activity; ActivityGroup is the class of inheriting in Activity, and it can move a plurality of Activity, and these a plurality of Activity are managed; View is used for the interface content that represents is arranged.TabWidget is a control, and corresponding tab is responsible for the displaying at tab interface.
Page toggle control (TabHost) is used to the page switch logic of realizing that some are inherent.Popular, TabHost is equivalent to a container, has comprised TabWidget, the FrameLayout container of arranging.Wherein, the FrameLayout container of arranging is used for the display page content.In addition, TabHost comprises inner classes TabSpec, and wherein, TabSpec mainly is the setting of encapsulation option card and corresponding content of pages.In practical application, the newTabSpec method through TabHost can be imported Activity or View into and construct TabSpec as parameter, and interpolation (addTab) method through TabHost joins TabHost with the TabSpec that constructs then.
In Tab, the tab and the page are one to one, will this tab corresponding page of corresponding demonstration when clicking a tab; But this page displayed can cover tab, promptly no longer comprises tab in this page displayed; So, when the user wants to show the new page, just must turn back to the page that does not cover tab before again from the current page; Reselect the page that tab is wanted with demonstration afterwards again, this greatly reduces the efficient that the page shows.
Summary of the invention
The invention provides the method and apparatus that the tab overall situation realizes in the Android system,, improve page display efficiency to guarantee that the tab overall situation occurs in the Android system.
Technical scheme provided by the invention comprises:
The method that the tab overall situation realizes in a kind of Android system comprises:
Set up first active groups, said first active groups comprises at least one tab;
Foundation comprises the active groups set of at least one active groups;
At least one active groups in the said active groups set is related with a tab in said first active groups; Arbitrary tab in adopting said first active groups starts corresponding when movable, with the said activity that starts be subordinated to its corresponding tab in the related active groups.
The device that the tab overall situation realizes in a kind of Android system comprises:
First sets up the unit, is used to set up first active groups, and said first active groups comprises at least one tab;
Second sets up the unit, is used to set up the active groups set that comprises at least one active groups;
Associative cell is used at least one active groups of said active groups set related with a tab in said first active groups; Arbitrary tab in adopting said first active groups starts corresponding when movable, with the said activity that starts be subordinated to its corresponding tab in the related active groups.
Can find out by above technical scheme, among the present invention, set up the incidence relation between active groups and the tab; When the tab startup activity, with the activity that starts be subordinated to its corresponding tab in the related active groups, also be; Have subordinate relation between activity that starts and the active groups, because association tab in the active groups, according to this subordinate relation; The activity that can obtain starting is association tab equally also, and this can guarantee that the tab overall situation occurs, so; When carrying out page jump; The tab that can be dependent in the activity of startup is carried out page jump, and need not as prior art, need turn back to the page that does not cover tab again, and this has improved page display efficiency greatly.
Description of drawings
Fig. 1 is the process flow diagram of tab overall situation implementation method in the Android provided by the invention system;
The synoptic diagram of incidence relation between active groups that Fig. 2 provides for the embodiment of the invention and the tab;
The structure drawing of device that Fig. 3 provides for the embodiment of the invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, describe the present invention below in conjunction with accompanying drawing and specific embodiment.
Fig. 1 is the process flow diagram of the method that the tab overall situation realizes in the Android provided by the invention system.As shown in Figure 1, this method can may further comprise the steps:
Step 101 is set up first active groups, and said first active groups comprises at least one tab.
Can comprise during this step 101 concrete realizations: set up a class of inheriting TabActivity, and tab is set in said type.Also promptly, the Total Options card in said first active groups is included in the TabActivity class of this foundation.
Step 102 is set up the active groups set that comprises at least one active groups.
Each active groups in the active groups set is separate.
Step 103, at least one active groups in the active groups set is related with a tab in said first active groups.
This step 103 is concrete can be comprised when realizing: be that each tab is set up the class of inheriting at least one active groups in active groups set, the addTab method through TabHost joins TabHost with such.
Step 104, the arbitrary tab in adopting said first active groups start corresponding when movable, with the said activity that starts be subordinated to its corresponding tab in the related active groups.
In this step 104, with the activity that starts be subordinated to its corresponding tab comprise in the related active groups: be the activity allocation identification (Id) of this startup, write down the corresponding tab of sign to this activity that this activity is assigned with in the related active groups.
Wherein, this step 104 can be specially through the movable method startup activity that starts (startActivity): sign that should activity is imported the method to startActivity into as parameter, should activity thereby start.
Need to prove; In the present embodiment, the sign of activity is being imported to startActivity method startup activity into the movable corresponding View that can the system of receiving returns as parameter; So; In the step 104, when movable corresponding View that the system of receiving returns, the View that this activity is corresponding replaces the corresponding View of current active.
Need to prove that also in the present embodiment, for ease of the activity in each active groups in the set of management activity group, need an identification list be set for each active groups in the active groups set, this identification list is used to deposit movable sign.Be applied to, the number of the activity sign that when initial, comprises to the identification list of each active groups setting is 0.
Based on this, in the step 104, for the activity allocation identification that starts comprises: the tab of the activity correspondence that will start the total value of the activity that identification list has comprised in the related active groups as the sign of the activity of this startup, and distribute to this activity.Correspondingly, in the step 104, the tab that the sign that the record activity is assigned with to this activity is corresponding comprise in the related active groups: write down the corresponding tab of sign to this activity that this activity is assigned with in the identification list of related active groups.
So far, accomplish flow process shown in Figure 1.
In above-mentioned flow process, can find out that based on step 103 the present invention is not that activity is related with tab, but active groups and tab carried out related that Fig. 2 shows the incidence relation between tab and the active groups.In Fig. 2, laterally be first active groups, vertically be the active groups set, wherein, each active groups has comprised identification list in the active groups set, comprises the sign of at least one Activity in each identification list.The active groups that Fig. 2 shows in the active groups set is related one by one with the tab in first active groups, has promptly constituted two-way active groups chain.
Need to prove, in the present embodiment, that tab is related with active groups; Come down to delimit the user and operate link according to tab, and, because the related different active groups of different tab; Therefore, can obtaining the corresponding user of different tab, to operate link be relatively independent.
In addition; In flow process shown in Figure 1; When through arbitrary tab from the current activity (being designated as first activity) that is in active state before returning during the opened activity that is in inactive state (being designated as second activity); Can carry out following steps: start second activity according to the second movable sign; The method that starts in this startup method and the step 102 is similar; Destroy all opened activities between first activity and first activity to the second activity, this destruction mode can realize through movable destruction (destroy Activity) method, and all opened movable signs between the sign of deletion first activity in the activity sign that each active groups has write down from the active groups set and first activity to the second activity.Here, why delete all opened movable signs between the first movable sign and first activity to the second activity, fundamental purpose is in order to save memory source.
In addition; In flow process shown in Figure 1; When the user adopts tab in said first active groups that setting operation is carried out in the activity that starts; The incident that said setting operation is corresponding is at first distributed to the related active groups of this tab, said incident is distributed to this activity according to the sign of this activity by this active groups, by the said incident of this active process.This has realized that the encapsulation incident in the Android system distributes function.
More than method that the embodiment of the invention is provided be described.
Can find out by above technical scheme; Set up the incidence relation between active groups and the tab among the present invention, when when the tab startup activity, with the activity that starts be subordinated to its corresponding tab in the related active groups; Also promptly, has subordinate relation between the activity of startup and the active groups.Because association tab in the active groups, according to this subordinate relation, the activity that can obtain starting is association tab equally also; This can guarantee that the tab overall situation occurs; So, when carrying out page jump, the tab that can be dependent in the activity of startup is carried out page jump; And need not as prior art, need turn back to the page that does not cover tab again, this has improved page display efficiency greatly.
The device that provides in the face of the embodiment of the invention is down described.
Referring to Fig. 3, the structure drawing of device that Fig. 3 provides for the embodiment of the invention.As shown in Figure 3, this device comprises:
First sets up the unit, is used to set up first active groups, and said first active groups comprises at least one tab;
Second sets up the unit, is used to set up the active groups set that comprises at least one active groups;
Associative cell is used at least one active groups of said active groups set related with a tab in said first active groups; Arbitrary tab in adopting said first active groups starts corresponding when movable, with the said activity that starts be subordinated to its corresponding tab in the related active groups.
In the present embodiment, as shown in Figure 3, when specifically realizing, said associative cell can comprise following two sub-cells:
Distribute subelement, be used to the activity allocation identification of this startup;
The record subelement, be used for writing down the corresponding tab of sign to this activity that this activity is assigned with related active groups.
In the present embodiment, as shown in Figure 3, said device further comprises: jump-transfer unit, unit and dispatch unit are set.
Wherein, Jump-transfer unit; Be used for when the arbitrary tab that adopts said first active groups before present located first activity is returned opened second when movable; Start this second activity according to the said second movable sign; Destroy all opened activities between first activity and first activity to the second activity, and all opened movable signs between the sign of deletion first activity in the activity sign that each active groups has write down from said active groups set and first activity to the second activity.
The unit is set, is used in each active groups of said active groups set, an identification list being set, be used to deposit the sign of the related activity that tab started of this active groups; Based on this, said distribution subelement be used for the movable corresponding tab of this startup the total value of the activity that comprised of related active groups identification list as the sign of the activity of this startup, and distribute to this activity; Said record subelement be used for writing down the corresponding tab of sign to this activity that this activity is assigned with the identification list of related active groups.
Dispatch unit; Be used for when the tab that adopts said first active groups is carried out setting operation to the activity that starts; The incident that said setting operation is corresponding is at first distributed to the related active groups of this tab; Said incident is distributed to this activity according to the sign of this activity by this active groups, by the said incident of this active process.
So far, accomplish the unit describe that the embodiment of the invention provides.
Can find out by above technical scheme, among the present invention, set up the incidence relation between active groups and the tab; When the tab startup activity, with the activity that starts be subordinated to its corresponding tab in the related active groups, also be; Have subordinate relation between activity that starts and the active groups, because association tab in the active groups, according to this subordinate relation; The activity that can obtain starting is association tab equally also, and this can guarantee that the tab overall situation occurs, so; When carrying out page jump; The tab that can be dependent in the activity of startup is carried out page jump, and need not as prior art, need turn back to the page that does not cover tab again, and this has improved page display efficiency greatly.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.

Claims (11)

1. the method that the tab overall situation realizes in the Android system is characterized in that this method comprises:
Set up the first active groups ActivityGroup, said first active groups comprises at least one tab;
Foundation comprises the active groups set of at least one active groups;
At least one active groups in the said active groups set is related with a tab in said first active groups;
When the arbitrary tab in adopting said first active groups starts corresponding movable Activity, with the said activity that starts be subordinated to its corresponding tab in the related active groups.
2. method according to claim 1 is characterized in that, the said activity that will start be subordinated to its corresponding tab comprise in the related active groups:
Be the activity allocation identification of this startup, write down the corresponding tab of sign to this activity that this activity is assigned with in the related active groups.
3. method according to claim 2 is characterized in that, when the arbitrary tab in adopting said first active groups was returned the second before opened activity from present located first activity, this method further comprised:
Start this second activity according to the said second movable sign; Destroy all opened activities between first activity and first activity to the second activity, and all opened movable signs between the sign of deletion first activity in the activity sign that each active groups has write down from said active groups set and first activity to the second activity.
4. method according to claim 2 is characterized in that, this method further comprises: in each active groups in said active groups set an identification list is set, is used to deposit the sign of the related activity that tab started of this active groups;
Saidly comprise for the activity allocation identification that starts: the tab of the activity correspondence that will start the total value of the activity that identification list has comprised in the related active groups as the sign of the activity of this startup, and distribute to this activity;
The tab that the sign that said record activity is assigned with to this activity is corresponding comprise in the related active groups: write down the corresponding tab of sign to this activity that this activity is assigned with in the identification list of related active groups.
5. method according to claim 2 is characterized in that, this method further comprises:
When the tab in adopting said first active groups is carried out setting operation to the activity that starts; The incident that said setting operation is corresponding is at first distributed to the related active groups of this tab; Said incident is distributed to this activity according to the sign of this activity by this active groups, by the said incident of this active process.
6. method according to claim 1 is characterized in that, said first active groups of setting up comprises:
Set up a class of inheriting TabActivity, and tab is set in said type;
Said with tab related comprising at least one active groups in the active groups set and first active groups: be each tab set up inherit at least one active groups in active groups set type, the interpolation addTab method through page toggle control TabHost joins TabHost with such.
7. the device that the tab overall situation realizes in the Android system is characterized in that this device comprises:
First sets up the unit, is used to set up the first active groups ActivityGroup, and said first active groups comprises at least one tab;
Second sets up the unit, is used to set up the active groups set that comprises at least one active groups;
Associative cell is used at least one active groups of said active groups set related with a tab in said first active groups; When the arbitrary tab in adopting said first active groups starts corresponding movable Activity, with the said activity that starts be subordinated to its corresponding tab in the related active groups.
8. device according to claim 7 is characterized in that, said associative cell comprises:
Distribute subelement, be used to the activity allocation identification of this startup;
The record subelement, be used for writing down the corresponding tab of sign to this activity that this activity is assigned with related active groups.
9. device according to claim 8 is characterized in that, said device further comprises:
Jump-transfer unit; Be used for when the arbitrary tab that adopts said first active groups before present located first activity is returned opened second when movable; Start this second activity according to the said second movable sign; Destroy all opened activities between first activity and first activity to the second activity, and all opened movable signs between the sign of deletion first activity in the activity sign that each active groups has write down from said active groups set and first activity to the second activity.
10. device according to claim 8 is characterized in that, said device further comprises:
The unit is set, is used in each active groups of said active groups set, an identification list being set, be used to deposit the sign of the related activity that tab started of this active groups;
Said distribution subelement be used for the movable corresponding tab of this startup the total value of the activity that comprised of related active groups identification list as the sign of the activity of this startup, and distribute to this activity;
Said record subelement be used for writing down the corresponding tab of sign to this activity that this activity is assigned with the identification list of related active groups.
11. device according to claim 8 is characterized in that, this device further comprises:
Dispatch unit; Be used for when the tab that adopts said first active groups is carried out setting operation to the activity that starts; The incident that said setting operation is corresponding is at first distributed to the related active groups of this tab; Said incident is distributed to this activity according to the sign of this activity by this active groups, by the said incident of 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 true CN102681827A (en) 2012-09-19
CN102681827B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617078A (en) * 2013-11-22 2014-03-05 北京奇虎科技有限公司 Method and device for managing active components
CN103745152A (en) * 2013-12-11 2014-04-23 深圳市欧珀通信软件有限公司 Advertisement shielding method and system based on mobile terminal
CN104503763A (en) * 2014-12-31 2015-04-08 深圳市航盛电子股份有限公司 Android label page and realization method thereof
WO2015058584A1 (en) * 2013-10-23 2015-04-30 北京奇虎科技有限公司 Method and device for communication between applications based on suspension operating panel
CN106843912A (en) * 2017-03-22 2017-06-13 武汉斗鱼网络科技有限公司 Page info acquisition methods and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020093537A1 (en) * 2001-01-16 2002-07-18 Siemens Medical Solutions Health Services Corporation. System and user interface supporting user navigation and concurrent application operation
CN101390081A (en) * 2005-04-07 2009-03-18 微软公司 System and method for selecting a tab within a tabbed browser

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020093537A1 (en) * 2001-01-16 2002-07-18 Siemens Medical Solutions Health Services Corporation. System and user interface supporting user navigation and concurrent application operation
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论坛》, 13 January 2011 (2011-01-13) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015058584A1 (en) * 2013-10-23 2015-04-30 北京奇虎科技有限公司 Method and device for communication between applications based on suspension operating panel
CN103617078A (en) * 2013-11-22 2014-03-05 北京奇虎科技有限公司 Method and device for managing active components
CN103745152A (en) * 2013-12-11 2014-04-23 深圳市欧珀通信软件有限公司 Advertisement shielding method and system based on mobile terminal
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
CN106843912A (en) * 2017-03-22 2017-06-13 武汉斗鱼网络科技有限公司 Page info acquisition methods and device

Also Published As

Publication number Publication date
CN102681827B (en) 2016-05-04

Similar Documents

Publication Publication Date Title
US9032292B2 (en) Simultaneous display of multiple maximized applications on touch screen electronic devices
CN102681827A (en) Method and device for overall achieving of tab in Android system
Motta et al. Cloud computing: An architectural and technological overview
CN105190525B (en) Management is in energy-saving mode to the access of hybrid drive
CN101923434B (en) Type setting method and system of application icon and mobile terminal
Raju et al. Interpretation and evaluation of various hybrid energy aware technologies in cloud computing environment—A detailed survey
CN105975201A (en) Mobile terminal and split screen processing method therefor
CN103020025A (en) Techniques for the automatic animation of document content
CN102982130A (en) Synchronized method for not only structured query language (NOSQL) and relational database management system (RDBMS) database and system thereof
CN103150154B (en) The implementation method and device of a kind of application plug
Jia et al. Efficient caching resource allocation for network slicing in 5G core network
CN105302423A (en) Intelligent screen-splitting method of mobile communication terminal, device and mobile communication terminal
CN103019781A (en) Rapid skin changing method based on Android system
CN102571940A (en) Remote application installation system, method, intelligent terminal and application server
CN103809975A (en) Method for achieving intelligent cloud forms
CN103051714A (en) Implementation method of water conservation cloud platform
CN104156222A (en) Method for self-defining Android equipment desktop
CN103279349A (en) Mobile phone or PDA multi-window browsing system based on moving middleware
CN102510421A (en) Method and client for correlating dial plate of terminal to data application
CN102306084A (en) Method and device for managing application programs
CN110321189A (en) A kind of method and apparatus that boarding program being presented in host program
CN102937948B (en) A kind of image, text and data edit methods of mobile terminal
CN105260085A (en) Application setting method and terminal utilizing same
CN103049546B (en) The method and apparatus of a kind of management, access system daily record
CN103064829A (en) Copy and paste method based on internet and copy and paste system

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