non-consuming activity 中文手册中文什么意思

没有更多推荐了,
加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!Again, these are non-trivial and time consuming tasks.
这些又一次是并非无关紧要的而且耗时的任务。
Compare on other method, whole detection procedure time consuming and short, automatic intensity high, non-destructive for lumber and saving cost greatly.
相比于其它方法,整个检测过程耗时短、自动化程度高、不损坏板材、大大节约了成本。
Setting the fill byte is time consuming; in fact, if the flags are only set to NULL on failure, the time taken is the same as the non-Ex strsafe functions.
其中设置填充字节的代码耗时较多。 事实上,如果这里仅仅把缓冲区设置为 NULL 的话,则采用 Ex 版本的 strsafe 系列函数的代码将会与采用普通的 strsafe 系列函数的代码耗时相同。
$firstVoiceSent
- 来自原声例句
请问您想要如何调整此模块?
感谢您的反馈,我们会尽快进行适当修改!
请问您想要如何调整此模块?
感谢您的反馈,我们会尽快进行适当修改!activity 生命周期 http://stackoverflow.com/questions/8515936/android-activity-life-cycle-what-are-all-these-methods-for
时间: 16:35:50
&&&& 阅读:281
&&&& 评论:
&&&& 收藏:0
标签:&&&&&&&&&&&&&&&&&&&&&&&&&&&&
See it in&&(at Android Developers).
Called when the activity is first created. This is where you should do all of your normal static set up: create views, bind data to lists, etc. This method also provides you with a Bundle containing the activity‘s previously frozen state, if there was one. Always followed by onStart().
Called after your activity has been stopped, prior to it being started again. Always followed by onStart()
Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.
Called when the activity will start interacting with the user. At this point your activity is at the top of the activity stack, with user input going to it. Always followed by onPause().
Called as part of the activity lifecycle when an activity is going into the background, but has not (yet) been killed. The counterpart to onResume(). When activity B is launched in front of activity A, this callback will be invoked on A. B will not be created until A‘s onPause() returns, so be sure to not do anything lengthy here.
Called when you are no longer visible to the user. You will next receive either onRestart(), onDestroy(), or nothing, depending on later user activity.
Note that this method may never be called, in low memory situations where the system does not have enough memory to keep your activity‘s process running after its onPause() method is called.
The final call you receive before your activity is destroyed. This can happen either because the activity is finishing (someone called finish() on it, or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between these two scenarios with the isFinishing() method.
When the Activity&first time loads&the events are called as below:
onCreate()
onResume()
When you&click on Phone button&the Activity goes to the background and the below events are called:
Exit the phone dialer&and the below events will be called:
onRestart()
onResume()
When you click the&back button&OR try to&finish()&the activity the events are called as below:
onDestroy()
The Android OS uses a priority queue to assist in managing activities running on the device. Based on the state a particular Android activity is in, it will be assigned a certain priority within the OS. This priority system helps Android identify activities that are no longer in use, allowing the OS to reclaim memory and resources. The following diagram illustrates the states an activity can go through, during its lifetime:
These states can be broken into three main groups as follows:
Active or Running&- Activities are considered active or running if they are in the foreground, also known as the top of the activity stack. This is considered the highest priority activity in the Android Activity stack, and as such will only be killed by the OS in extreme situations, such as if the activity tries to use more memory than is available on the device as this could cause the UI to become unresponsive.
Paused&- When the device goes to sleep, or an activity is still visible but partially hidden by a new, non-full-sized or transparent activity, the activity is considered paused. Paused activities are still alive, that is, they maintain all state and member information, and remain attached to the window manager. This is considered to be the second highest priority activity in the Android Activity stack and, as such, will only be killed by the OS if killing this activity will satisfy the resource requirements needed to keep the Active/Running Activity stable and responsive.
Stopped&- Activities that are completely obscured by another activity are considered stopped or in the background. Stopped activities still try to retain their state and member information for as long as possible, but stopped activities are considered to be the lowest priority of the three states and, as such, the OS will kill activities in this state first to satisfy the resource requirements of higher priority activities.
Sample activity to understand the life cycle*
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends Activity {
String tag = "LifeCycleEvents";
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d(tag, "In the onCreate() event");
public void onStart()
super.onStart();
Log.d(tag, "In the onStart() event");
public void onRestart()
super.onRestart();
Log.d(tag, "In the onRestart() event");
public void onResume()
super.onResume();
Log.d(tag, "In the onResume() event");
public void onPause()
super.onPause();
Log.d(tag, "In the onPause() event");
public void onStop()
super.onStop();
Log.d(tag, "In the onStop() event");
public void onDestroy()
super.onDestroy();
Log.d(tag, "In the onDestroy() event");
8,155105691
12.9k1455104
Activity have six states
Activity lifecycle have seven methods
onCreate()
onResume()
onStopped()
onRestart()
onDestory()
Situations
When open the app
onCreate() --& onStart() --&
onResume()
When back button pressed and exit the app
onPaused() -- & onStop() --& onDestory()
When home button pressed
onPaused() --& onStop()
After pressed home button when again open app from recent task list or clicked on icon
onRestart() --& onStart() --& onResume()
When open app another app from notification bar or open settings
onPaused() --& onStop()
Back button pressed from another app or settings then used can see our app
onRestart() --& onStart() --& onResume()
When any dialog open on screen
After dismiss the dialog or back button from dialog
onResume()
Any phone is ringing and user in the app
onPause() --& onResume()
When user pressed phone‘s answer button
After call end
onResume()
When phone screen off
onPaused() --& onStop()
Again screen on
onRestart() --& onStart() --& onResume()
The best Demo Application for understanding Activity Life Cycle is&&apk file attached.
There are seven methods that manage the life cycle of an Android application:
Answer for what are all these methods for:
Let us take a simple scenario where knowing in what order these methods are called will help us give a clarity why they are used.
Suppose you are using a calculator app. Three methods are called in succession to start the app.
onCreate()&- - - &&onStart()&- - - &&onResume()
When I am using the calculator app, suddenly a call comes the. The calculator activity goes to the background and another activity say. Dealing with the call comes to the foreground, and now two methods are called in succession.
onPause()&- - - &&onStop()
Now say I finish the conversation on the phone, the calculator activity comes to foreground from the background, so three methods are called in succession.
onRestart()&- - - &&onStart()&- - - &&onResume()
Finally, say I have finished all the tasks in calculator app, and I want to exit the app. Futher two methods are called in succession.
onStop()&- - - &&onDestroy()
There are four states an activity can possibly exist:
Starting State
Running State
Paused State
Stopped state
Starting state involves:
Creating a new Linux process, allocating new memory for the new UI objects, and setting up the whole screen. So most of the work is involved here.
Running state involves:
It is the activity (state) that is currently on the screen. This state alone handles things such as typing on the screen, and touching & clicking buttons.
Paused state involves:
When an activity is not in the foreground and instead it is in the background, then the activity is said to be in paused state.
Stopped state involves:
A stopped activity can only be bought into foreground by restarting it and also it can be destroyed at any point in time.
The activity manager handles all these states in such a way that the user experience and performance is always at its best even in scenarios where the new activity is added to the existing activities
353k32641840
5,66464671
From the Android Developers page,
onPause():
Called when the system is about to start resuming a previous activity. This is typically used to commit unsaved changes to persistent data, stop animations and other things that may be consuming CPU, etc. Implementations of this method must be very quick because the next activity will not be resumed until this method returns. Followed by either onResume() if the activity returns back to the front, or onStop() if it becomes invisible to the user.
Called when the activity is no longer visible to the user, because another activity has been resumed and is covering this one. This may happen either because a new activity is being started, an existing one is being brought in front of this one, or this one is being destroyed. Followed by either onRestart() if this activity is coming back to interact with the user, or onDestroy() if this activity is going away.
Now suppose there are three Activities and you go from A to B, then onPause of A will be called now from B to C, then onPause of B and onStop of A will be called.
The paused Activity gets a Resume and Stopped gets Restarted.
When you call&this.finish(), onPause-onStop-onDestroy will be called. The main thing to remember is: paused Activities get Stopped and a Stopped activity gets Destroyed whenever Android requires memory for other operations.
I hope it‘s clear enough.
8,155105691
2,990104986
The entire confusion is caused since Google chose non-intuivitive names instead of something as follows:
onCreateAndPrepareToDisplay()
[instead of onCreate() ]
onPrepareToDisplay()
[instead of onRestart() ]
onVisible()
[instead of onStart() ]
onBeginInteraction()
[instead of onResume() ]
onPauseInteraction()
[instead of onPause() ]
onInvisible()
[instead of onStop]
onDestroy()
[no change]
The Activity Diagram can be interpreted as:
标签:&&&&&&&&&&&&&&&&&&&&&&&&&&&原文:http://www.cnblogs.com/prettyisshit/p/4422375.html
教程昨日排行
&&国之画&&&& &&&&&&
&& &&&&&&&&&&&&&&
鲁ICP备号-4
打开技术之扣,分享程序人生!Filter by API Level:
&&&↳
&&&↳
&&&↳
&&&↳
android.app.Activity
Known Direct Subclasses
Base class for implementing an Activity that is used to help implement an
AbstractAccountAuthenticator.&
A screen that contains and runs multiple embedded activities.&
Stub activity that launches another activity (and then finishes itself)
based on information in its component's manifest meta-data.&
An activity that displays an expandable list of items by binding to a data
source implementing the ExpandableListAdapter, and exposes event handlers
when the user selects an item.&
An activity that displays a list of items by binding to a data source such as
an array or Cursor, and exposes event handlers when the user selects an item.&
Convenience for implementing an activity that will be implemented
purely in native code.&
Known Indirect Subclasses
Displays a list of all activities which can be performed
for a given intent.&
This is the base class for an activity to show a hierarchy of preferences
to the user.&
An activity that contains and runs multiple embedded activities or views.&
Class Overview
An activity is a single, focused thing that the user can do.
Almost all
activities interact with the user, so the Activity class takes care of
creating a window for you in which you can place your UI with
While activities are often presented to the user
as full-screen windows, they can also be used in other ways: as floating
windows (via a theme with
or embedded inside of another activity (using ).
There are two methods almost all subclasses of Activity will implement:
is where you initialize your activity.
importantly, here you will usually call
with a layout resource defining your UI, and using
to retrieve the widgets in that UI that you need to interact with
programmatically.
is where you deal with the user leaving your
Most importantly, any changes made by the user should at this
point be committed (usually to the
holding the data).
To be of use with , all
activity classes must have a corresponding
declaration in their package's AndroidManifest.xml.
The Activity class is an important part of an application's overall lifecycle,
and the way activities are launched and put together is a fundamental
part of the platform's application model. For a detailed perspective on the structure of an
Android application and how activities behave, please read the
documents.
You can also find a detailed discussion about how to create activities in the
Topics covered here:
Starting with , Activity
implementations can make use of the
class to better
modularize their code, build more sophisticated user interfaces for larger
screens, and help scale their application between small and large screens.
Activity Lifecycle
Activities in the system are managed as an activity stack.
When a new activity is started, it is placed on the top of the stack
and becomes the running activity -- the previous activity always remains
below it in the stack, and will not come to the foreground again until
the new activity exits.
An activity has essentially four states:
If an activity in the foreground of the screen (at the top of
the stack),
it is active or
If an activity has lost focus but is still visible (that is, a new non-full-sized
or transparent activity has focus on top of your activity), it
is paused. A paused activity is completely alive (it
maintains all state and member information and remains attached to
the window manager), but can be killed by the system in extreme
low memory situations.
If an activity is completely obscured by another activity,
it is stopped. It still retains all state and member information,
however, it is no longer visible to the user so its window is hidden
and it will often be killed by the system when memory is needed
elsewhere.
If an activity is paused or stopped, the system can drop the activity
from memory by either asking it to finish, or simply killing its
When it is displayed again to the user, it must be
completely restarted and restored to its previous state.
The following diagram shows the important state paths of an Activity.
The square rectangles represent callback methods you can implement to
perform operations when the Activity moves between states.
The colored
ovals are major states the Activity can be in.
There are three key loops you may be interested in monitoring within your
The entire lifetime of an activity happens between the first call
through to a single final call
An activity will do all setup
of "global" state in onCreate(), and release all remaining resources in
onDestroy().
For example, if it has a thread running in the background
to download data from the network, it may create that thread in onCreate()
and then stop the thread in onDestroy().
The visible lifetime of an activity happens between a call to
until a corresponding call to
During this time the user can see the
activity on-screen, though it may not be in the foreground and interacting
with the user.
Between these two methods you can maintain resources that
are needed to show the activity to the user.
For example, you can register
in onStart() to monitor for changes
that impact your UI, and unregister it in onStop() when the user an no
longer see what you are displaying.
The onStart() and onStop() methods
can be called multiple times, as the activity becomes visible and hidden
to the user.
The foreground lifetime of an activity happens between a call to
until a corresponding call to
During this time the activity is
in front of all other activities and interacting with the user.
An activity
can frequently go between the resumed and paused states -- for example when
the device goes to sleep, when an activity result is delivered, when a new
intent is delivered -- so the code in these methods should be fairly
lightweight.
The entire lifecycle of an activity is defined by the following
Activity methods.
All of these are hooks that you can override
to do appropriate work when the activity changes state.
activities will implement
to do many will also implement
to commit changes to data and
otherwise prepare to stop interacting with the user.
You should always
call up to your superclass when implementing these methods.
public class Activity extends ApplicationContext {
protected void onCreate(Bundle savedInstanceState);
protected void onStart();
protected void onRestart();
protected void onResume();
protected void onPause();
protected void onStop();
protected void onDestroy();
In general the movement through an activity's lifecycle looks like
Method Description Killable? Next
Called when the activity is first created.
This is where you should do all of your normal static set up:
create views, bind data to lists, etc.
This method also
provides you with a Bundle containing the activity's previously
frozen state, if there was one.
Always followed by onStart().
Called after your activity has been stopped, prior to it being
started again.
Always followed by onStart()
Called when the activity is becoming visible to the user.
Followed by onResume() if the activity comes
to the foreground, or onStop() if it becomes hidden.
onResume() or onStop()
Called when the activity will start
interacting with the user.
At this point your activity is at
the top of the activity stack, with user input going to it.
Always followed by onPause().
Called when the system is about to start resuming a previous
This is typically used to commit unsaved changes to
persistent data, stop animations and other things that may be consuming
Implementations of this method must be very quick because
the next activity will not be resumed until this method returns.
Followed by either onResume() if the activity
returns back to the front, or onStop() if it becomes
invisible to the user.
onResume() or
Called when the activity is no longer visible to the user, because
another activity has been resumed and is covering this one.
may happen either because a new activity is being started, an existing
one is being brought in front of this one, or this one is being
destroyed.
Followed by either onRestart() if
this activity is coming back to interact with the user, or
onDestroy() if this activity is going away.
onRestart() or
onDestroy()
The final call you receive before your
activity is destroyed.
This can happen either because the
activity is finishing (someone called
it, or because the system is temporarily destroying this
instance of the activity to save space.
You can distinguish
between these two scenarios with the
Note the "Killable" column in the above table -- for those methods that
are marked as being killable, after that method returns the process hosting the
activity may killed by the system at any time without another line
of its code being executed.
Because of this, you should use the
method to write any persistent data (such as user edits)
to storage.
In addition, the method
is called before placing the activity
in such a background state, allowing you to save away any dynamic instance
state in your activity into the given Bundle, to be later received in
if the activity needs to be re-created.
section for more information on how the lifecycle of a process is tied
to the activities it is hosting.
Note that it is important to save
persistent data in
instead of
because the later is not part of the lifecycle callbacks, so will not
be called in every situation as described in its documentation.
Be aware that these semantics will change slightly between
applications targeting platforms starting with
vs. those targeting prior platforms.
Starting with Honeycomb, an application
is not in the killable state until its
has returned.
impacts when
may be called (it may be
safely called after
and allows and application to safely
wait until
to save persistent state.
For those methods that are not marked as being killable, the activity's
process will not be killed by the system starting from the time the method
is called and continuing after it returns.
Thus an activity is in the killable
state, for example, between after onPause() to the start of
onResume().
Configuration Changes
If the configuration of the device (as defined by the
class) changes,
then anything displaying a user interface will need to update to match that
configuration.
Because Activity is the primary mechanism for interacting
with the user, it includes special support for handling configuration
Unless you specify otherwise, a configuration change (such as a change
in screen orientation, language, input devices, etc) will cause your
current activity to be destroyed, going through the normal activity
lifecycle process of ,
as appropriate.
If the activity
had been in the foreground or visible to the user, once
called in that instance then a new instance of the activity will be
created, with whatever savedInstanceState the previous instance had generated
This is done because any application resource,
including layout files, can change based on any configuration value.
the only safe way to handle a configuration change is to re-retrieve all
resources, including layouts, drawables, and strings.
Because activities
must already know how to save their state and re-create themselves from
that state, this is a convenient way to have an activity restart itself
with a new configuration.
In some special cases, you may want to bypass restarting of your
activity based on one or more types of configuration changes.
done with the
attribute in its manifest.
For any types of configuration changes you say
that you handle there, you will receive a call to your current activity's
method instead of being restarted.
a configuration change involves any that you do not handle, however, the
activity will still be restarted and
will not be called.
Starting Activities and Getting Results
method is used to start a
new activity, which will be placed at the top of the activity stack.
takes a single argument, an ,
which describes the activity
to be executed.
Sometimes you want to get a result back from an activity when it
For example, you may start an activity that lets the user pick
a person i when it ends, it returns the person
that was selected.
To do this, you call the
version with a second integer parameter identifying the call.
The result
will come back through your
When an activity exits, it can call
to return data back to its parent.
It must always supply a result code,
which can be the standard results RESULT_CANCELED, RESULT_OK, or any
custom values starting at RESULT_FIRST_USER.
In addition, it can optionally
return back an Intent containing any additional data it wants.
All of this
information appears back on the
parent's Activity.onActivityResult(), along with the integer
identifier it originally supplied.
If a child activity fails for any reason (such as crashing), the parent
activity will receive a result with the code RESULT_CANCELED.
public class MyActivity extends Activity {
static final int PICK_CONTACT_REQUEST = 0;
protected boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
// When the user center presses, let them pick a contact.
startActivityForResult(
new Intent(Intent.ACTION_PICK,
new Uri("content://contacts")),
PICK_CONTACT_REQUEST);
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
if (requestCode == PICK_CONTACT_REQUEST) {
if (resultCode == RESULT_OK) {
// A contact was picked.
Here we will just display it
// to the user.
startActivity(new Intent(Intent.ACTION_VIEW, data));
Saving Persistent State
There are generally two kinds of persistent state than an activity
will deal with: shared document-like data (typically stored in a SQLite
database using a )
and internal state such as user preferences.
For content provider data, we suggest that activities use a
"edit in place" user model.
That is, any edits a user makes are effectively
made immediately without requiring an additional confirmation step.
Supporting this model is generally a simple matter of following two rules:
When creating a new document, the backing database entry or file for
it is created immediately.
For example, if the user chooses to write
a new e-mail, a new entry for that e-mail is created as soon as they
start entering data, so that if they go to any other activity after
that point this e-mail will now appear in the list of drafts.
When an activity's onPause() method is called, it should
commit to the backing content provider or file any changes the user
This ensures that those changes will be seen by any other
activity that is about to run.
You will probably want to commit
your data even more aggressively at key times during your
activity's lifecycle: for example before starting a new
activity, before finishing your own activity, when the user
switches between input fields, etc.
This model is designed to prevent data loss when a user is navigating
between activities, and allows the system to safely kill an activity (because
system resources are needed somewhere else) at any time after it has been
Note this implies
that the user pressing BACK from your activity does not
mean "cancel" -- it means to leave the activity with its current contents
saved away.
Canceling edits in an activity must be provided through
some other mechanism, such as an explicit "revert" or "undo" option.
more information about content providers.
These are a key aspect of how
different activities invoke and propagate data between themselves.
The Activity class also provides an API for managing internal persistent state
associated with an activity.
This can be used, for example, to remember
the user's preferred initial display in a calendar (day view or week view)
or the user's default home page in a web browser.
Activity persistent state is managed
with the method ,
allowing you to retrieve and
modify a set of name/value pairs associated with the activity.
preferences that are shared across multiple application components
(activities, receivers, services, providers), you can use the underlying
to retrieve a preferences
object stored under a specific name.
(Note that it is not possible to share settings data across application
packages -- for that you will need a content provider.)
Here is an excerpt from a calendar activity that stores the user's
preferred view mode in its persistent settings:
public class CalendarActivity extends Activity {
static final int DAY_VIEW_MODE = 0;
static final int WEEK_VIEW_MODE = 1;
private SharedPreferences mP
private int mCurViewM
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences mPrefs = getSharedPreferences();
mCurViewMode = mPrefs.getInt("view_mode" DAY_VIEW_MODE);
protected void onPause() {
super.onPause();
SharedPreferences.Editor ed = mPrefs.edit();
ed.putInt("view_mode", mCurViewMode);
ed.commit();
Permissions
The ability to start a particular Activity can be enforced when it is
declared in its
manifest's
By doing so, other applications will need to declare a corresponding
element in their own manifest to be able to start that activity.
document for more information on permissions and security in general.
Process Lifecycle
The Android system attempts to keep application process around for as
long as possible, but eventually will need to remove old processes when
memory runs low.
As described in , the decision about which process to remove is intimately
tied to the state of the user's interaction with it.
In general, there
are four states a process can be in based on the activities running in it,
listed here in order of importance.
The system will kill less important
processes (the last ones) before it resorts to killing more important
processes (the first ones).
The foreground activity (the activity at the top of the screen
that the user is currently interacting with) is considered the most important.
Its process will only be killed as a last resort, if it uses more memory
than is available on the device.
Generally at this point the device has
reached a memory paging state, so this is required in order to keep the user
interface responsive.
A visible activity (an activity that is visible to the user
but not in the foreground, such as one sitting behind a foreground dialog)
is considered extremely important and will not be killed unless that is
required to keep the foreground activity running.
A background activity (an activity that is not visible to
the user and has been paused) is no longer critical, so the system may
safely kill its process to reclaim memory for other foreground or
visible processes.
If its process needs to be killed, when the user navigates
back to the activity (making it visible on the screen again), its
method will be called with the savedInstanceState it had previously
supplied in
so that it can restart itself in the same
state as the user last left it.
An empty process is one hosting no activities or other
application components (such as
These are killed very
quickly by the system as memory becomes low.
For this reason, any
background operation you do outside of an activity must be executed in the
context of an activity BroadcastReceiver or Service to ensure that the system
knows it needs to keep your process around.
Sometimes an Activity may need to do a long-running operation that exists
independently of the activity lifecycle itself.
An example may be a camera
application that allows you to upload a picture to a web site.
The upload
may take a long time, and the application should allow the user to leave
the application will it is executing.
To accomplish this, your Activity
should start a
in which the upload takes place.
This allows
the system to properly prioritize your process (considering it to be more
important than other non-visible applications) for the duration of the
upload, independent of whether the original activity is paused, stopped,
or finished.
to launch the dialer during default
key handling.
to turn off default handling of
to specify that unhandled keystrokes
will start a global search (typically web search, but some platforms may define alternate
methods for global search)
for more details.
to specify that unhandled keystrokes
will start an application-defined search.
to execute a menu shortcut in
default key handling.
Standard activity result: operation canceled.
Start of user-defined activity results.
Standard activity result: operation succeeded.
Inherited Constants
From class
to retrieve a
for giving the user
feedback for UI events through the registered event listeners.
to retrieve a
for receiving intents at a
time of your choosing.
to retrieve a
for interacting with the global
system state.
to retrieve a
for receiving intents at a
time of your choosing.
to retrieve a
for handling management of volume,
ringer modes and audio routing.
Flag for : automatically create the service as long
as the binding exists.
Flag for : include debugging help for mismatched
calls to unbind.
Flag for : don't allow this binding to raise
the target service's process to the foreground scheduling priority.
to retrieve a
for accessing and modifying
the contents of the global clipboard.
to retrieve a
for handling management of
network connections.
Flag for use with : ignore any security
restrictions on the Context being requested, allowing it to always
be loaded.
Flag for use with : include the application
code with the context.
Flag for use with : a restricted context may
disable specific features.
to retrieve a
for working with global
device policy management.
to retrieve a
for requesting HTTP downloads.
to retrieve a
instance for recording
diagnostic logs.
to retrieve a
for accessing input
to retrieve a
for controlling keyguard.
to retrieve a
for inflating layout resources in this
to retrieve a
for controlling location
File creation mode: for use with , if the file
already exists then write data to the end of the existing file
instead of erasing it.
SharedPreference loading flag: when set, the file on disk will
be checked for modification even if the shared preferences
instance is already loaded in this process.
File creation mode: the default mode, where the created file can only
be accessed by the calling application (or all applications sharing the
same user ID).
File creation mode: allow all other applications to have read access
to the created file.
File creation mode: allow all other applications to have write access
to the created file.
to retrieve a
for using NFC.
to retrieve a
for informing the user of
background events.
to retrieve a
for controlling power management,
including "wake locks," which let you keep the device on while
you're running long tasks.
to retrieve a
for handling searches.
to retrieve a
for accessing sensors.
to retrieve a
for accessing system storage
functions.
to retrieve a
for handling management the
telephony features of the device.
to retrieve a
for controlling UI modes.
to retrieve a
for interacting with the vibration hardware.
to retrieve a
com.android.server.WallpaperService for accessing wallpapers.
to retrieve a
for handling management of
Wi-Fi access.
to retrieve a
for accessing the system's window
Public Constructors
Public Methods
Add an additional content view to the activity.
Programmatically closes the most recently opened context menu, if showing.
Progammatically closes the options menu.
(int requestCode,
data, int flags)
Create a new PendingIntent object which you can hand to others
for them to use to send result data back to your
Dismiss a dialog that was previously shown via .
Called to process key events.
Called to process a key shortcut event.
Called to process population of s.
Called to process touch screen events.
Called to process trackball events.
Print the Activity's state into the given stream.
Finds a view that was identified by the id attribute from the XML that
was processed in .
Call this when your activity is done and should be closed.
(int requestCode)
Force finish another activity that you had previously started with
( child, int requestCode)
This is called when a child activity of this one calls its
finishActivity().
This is called when a child activity of this one calls its
Retrieve a reference to this activity's ActionBar.
Return the application that owns this activity.
Return the name of the activity that invoked this activity.
Return the name of the package that invoked this activity.
If this activity is being destroyed because it can not handle a
configuration parameter being changed (and thus its
not being called), then you can use this method to discover
the set of changes that have occurred while in the process of being
destroyed.
Returns complete component name of this activity.
Window of this Activity to return the currently focused view.
Return the FragmentManager for interacting with fragments associated
with this activity.
Return the intent that started this activity.
Retrieve the non-configuration instance data that was previously
returned by .
Convenience for calling
Return the LoaderManager for this fragment, creating it if needed.
Returns class name for this activity with the package prefix removed.
with this context.
Return the parent activity if this view is an embedded child.
(int mode)
Retrieve a
object for accessing preferences
that are private to this activity.
Return the current requested orientation of the activity.
Return the handle to a system-level service by name.
Return the identifier of the task this activity is in.
Gets the suggested audio stream whose volume should be changed by the
harwdare volume controls.
This method is deprecated.
This method is deprecated.
Retrieve the current
for the activity.
Retrieve the window manager for showing custom windows.
Returns true if this activity's main window currently has window focus.
Declare that the options menu has changed, so should be recreated.
Check to see whether this activity is in the process of being destroyed in order to be
recreated with a new configuration.
Is this activity embedded inside of another activity?
Check to see whether this activity is in the process of finishing,
either because you called
on it or someone else
has requested that it finished.
Return whether this activity is the root of a task.
projection,
selection,
selectionArgs,
sortOrder)
This method is deprecated.
(boolean nonRoot)
Move the task containing this activity to the back of the activity
Notifies the activity that an action mode has finished.
Notifies the Activity that an action mode has been started.
( fragment)
Called when a Fragment is being attached to this activity, immediately
after the call to its
method and before .
Called when the main window associated with the activity has been
attached to the window manager.
Called when the activity has detected the user's press of the back
( newConfig)
Called by the system when the device configuration changes while your
activity is running.
This hook is called whenever the content view of the screen changes
(due to a call to
This hook is called whenever an item in a context menu is selected.
This hook is called whenever the context menu is being closed (either by
the user canceling the menu with the back/menu button, or when an item is
selected).
Called when a context menu for the view is about to be shown.
Generate a new description for this activity.
Initialize the contents of the Activity's standard options menu.
(int featureId,
Default implementation of
for activities.
(int featureId)
Default implementation of
for activities.
( outBitmap,
Generate a new thumbnail for this activity.
Standard implementation of
used when inflating with the LayoutInflater returned by .
Standard implementation of
inflating with the LayoutInflater returned by .
Called when the main window associated with the activity has been
detached from the window manager.
(int keyCode,
Called when a key was pressed down and not handled by any of the views
inside of the activity.
(int keyCode,
Default implementation of : always returns false (doesn't handle
the event).
(int keyCode, int repeatCount,
Default implementation of : always returns false (doesn't handle
the event).
(int keyCode,
Called when a key shortcut event is not handled by any of the views in the Activity.
(int keyCode,
Called when a key was released and not handled by any of the views
inside of the activity.
This is called when the overall system is running low on memory, and
would like actively running process to try to tighten their belt.
(int featureId,
Default implementation of
for activities.
(int featureId,
Called when a panel's menu is opened by the user.
This hook is called whenever an item in your options menu is selected.
This hook is called whenever the options menu is being closed (either by the user canceling
the menu with the back/menu button, or when an item is selected).
(int featureId,
Default implementation of
activities.
Prepare the Screen's standard options menu to be displayed.
(int featureId,
Default implementation of
for activities.
Called by the system, as part of destroying an
activity due to a configuration change, when it is known that a new
instance will immediately be created for the new configuration.
This hook is called when the user signals the desire to start a search.
Called when a touch screen event was not handled by any of the views
Called when the trackball was moved and not handled by any of the
views inside of the activity.
Called whenever a key, touch, or trackball event is dispatched to the
This is called whenever the current window attributes change.
(boolean hasFocus)
Called when the current
of the activity gains or loses
( callback)
Give the Activity a chance to control the UI for an action mode requested
by the system.
Programmatically opens the context menu for a particular view.
Programmatically opens the options menu.
(int enterAnim, int exitAnim)
Call immediately after one of the flavors of
to specify an explicit transition animation to
perform next.
Cause this Activity to be recreated with a new instance.
Registers a context menu to be shown for the given view (multiple views
can show the context menu).
Removes any internal references to a dialog managed by this Activity.
(int featureId)
Enable extended window features.
Runs the specified action on the UI thread.
(int layoutResID)
Set the activity content from a layout resource.
Set the activity content to an explicit view.
Set the activity content to an explicit view.
(int mode)
Select the default key handling for this activity.
(int featureId,
Convenience for calling
(int featureId, int alpha)
Convenience for calling
(int featureId, int resId)
Convenience for calling
(int featureId,
Convenience for calling
(boolean finish)
Sets whether this activity is finished when touched outside its window's
( newIntent)
Change the intent returned by .
(int progress)
Sets the progress for the progress bars in the title.
(boolean indeterminate)
Sets whether the horizontal progress bar in the title should be indeterminate (the circular
is always indeterminate).
(boolean visible)
Sets the visibility of the indeterminate progress bar in the title.
(boolean visible)
Sets the visibility of the progress bar in the title.
(int requestedOrientation)
Change the desired orientation of this activity.
(int resultCode)
Call this to set the result that your activity will return to its
(int resultCode,
Call this to set the result that your activity will return to its
(int secondaryProgress)
Sets the secondary progress for the progress bar in the title.
(int titleId)
Change the title associated with this activity.
Change the title associated with this activity.
(int textColor)
(boolean visible)
Control whether this activity's main window is visible.
(int streamType)
Suggests an audio stream whose volume should be changed by the hardware
volume controls.
Show a dialog managed by this activity.
Simple version of
that does not
take any arguments.
( callback)
Start an action mode.
( intents)
Launch a new activity.
Launch a new activity.
( intent, int requestCode)
Launch an activity for which you would like a result when it finished.
intent, int requestCode)
This is called when a child activity of this one calls its
( fragment,
intent, int requestCode)
This is called when a Fragment in this activity calls its
( intent, int requestCode)
A special variation to launch an activity only if a new activity
instance is needed to handle the given Intent.
fillInIntent, int flagsMask, int flagsValues, int extraFlags)
Like , but taking a IntentSender
for more information.
( intent, int requestCode,
fillInIntent, int flagsMask, int flagsValues, int extraFlags)
Like , but allowing you
to use a IntentSender to describe the activity to be started.
intent, int requestCode,
fillInIntent, int flagsMask, int flagsValues, int extraFlags)
Like , but
taking a IntentS see
for more information.
This method is deprecated.
Special version of starting an activity, for use when you are replacing
other activity components.
( initialQuery, boolean selectInitialQuery,
appSearchData, boolean globalSearch)
This hook is called to launch the search UI.
This method is deprecated.
(boolean get)
Request that key events come to this activity.
appSearchData)
Similar to , but actually fires off the search query after invoking
the search dialog.
Prevents a context menu to be shown for the given view.
Protected Methods
(int requestCode, int resultCode,
Called when an activity you launched exits, giving you the requestCode
you started it with, the resultCode it returned, and any additional
data from it.
( theme, int resid, boolean first)
to apply a theme
resource to the current Theme object.
( childActivity,
( savedInstanceState)
Called when the activity is starting.
This method is deprecated.
Old no-arguments version of .
Callback for creating dialogs that are managed (saved and restored) for you
by the activity.
Perform any final cleanup before an activity is destroyed.
This is called for activities that set launchMode to "singleTop" in
their package, or if a client used the
flag when calling .
Called as part of the activity lifecycle when an activity is going into
the background, but has not (yet) been killed.
( savedInstanceState)
Called when activity start-up is complete (after
have been called).
Called when activity resume is complete (after
been called).
This method is deprecated.
Old no-arguments version of
Provides an opportunity to prepare a managed dialog before it is being
Called after
when the current activity is being
re-displayed to the user (the user has navigated back to it).
( savedInstanceState)
This method is called after
when the activity is
being re-initialized from a previously saved state, given here in
savedInstanceState.
Called after , , or
, for your activity to start interacting with the user.
( outState)
Called to retrieve per-instance state from an activity before being killed
so that the state can be restored in
populated by this method
will be passed to both).
Called after
& or after
the activity had been stopped, but is now again being displayed to the
Called when you are no longer visible to the user.
( title, int color)
Called as part of the activity lifecycle when an activity is about to go
into the background as the result of user choice.
Inherited Methods
From class
( newBase)
Set the base context for this ContextWrapper.
Return the handle to a system-level service by name.
Return the Theme object associated with this Context.
( theme, int resid, boolean first)
to apply a theme
resource to the current Theme object.
(int resid)
Set the base theme for this context.
From class
Set the base context for this ContextWrapper.
( service,
conn, int flags)
Connect to an application service, creating it if needed.
( permission)
Determine whether the calling process of an IPC or you have been
granted a particular permission.
( uri, int modeFlags)
Determine whether the calling process of an IPC or you has been granted
permission to access a specific URI.
( permission)
Determine whether the calling process of an IPC you are handling has been
granted a particular permission.
( uri, int modeFlags)
Determine whether the calling process and user ID has been
granted permission to access a specific URI.
( permission, int pid, int uid)
Determine whether the given permission is allowed for a particular
process and user ID running in the system.
( uri, int pid, int uid, int modeFlags)
Determine whether a particular process and user ID has been granted
permission to access a specific URI.
readPermission,
writePermission, int pid, int uid, int modeFlags)
Check both a Uri and normal permission.
This method is deprecated.
( packageName, int flags)
Return a new Context object for the given application name.
Returns an array of strings naming the private databases associated with
this Context's application package.
Delete an existing private SQLiteDatabase associated with this Context's
application package.
Delete the given private file associated with this Context's
application package.
( permission,
If neither you nor the calling process of an IPC you are
handling has been granted a particular permission, throw a
( uri, int modeFlags,
If the calling process of an IPC or you has not been
granted permission to access a specific URI, throw .
( permission,
If the calling process of an IPC you are handling has not been
granted a particular permission, throw a .
( uri, int modeFlags,
If the calling process and user ID has not been granted
permission to access a specific URI, throw .
( permission, int pid, int uid,
If the given permission is not allowed for a particular process
and user ID running in the system, throw a .
( uri, int pid, int uid, int modeFlags,
If a particular process and user ID has not been granted
permission to access a specific URI, throw .
readPermission,
writePermission, int pid, int uid, int modeFlags,
Enforce both a Uri and normal permission.
Returns an array of strings naming the private files associated with
this Context's application package.
Return the context of the single, global Application object of the
current process.
Return the full application info for this context's package.
Return an AssetManager instance for your application's package.
Returns the absolute path to the application specific cache directory
on the filesystem.
Return a class loader you can use to retrieve classes in this package.
Return a ContentResolver instance for your application's package.
Returns the absolute path on the filesystem where a database created with
is stored.
( name, int mode)
Retrieve, creating if needed, a new directory in which the application
can place its own custom data files.
Returns the absolute path to the directory on the external filesystem
(that is somewhere on
where the application can
place cache files it owns.
Returns the absolute path to the directory on the external filesystem
(that is somewhere on ) where the application can
place persistent files it owns.
Returns the absolute path on the filesystem where a file created with
is stored.
Returns the absolute path to the directory on the filesystem where
files created with
are stored.
Return the Looper for the main thread of the current process.
Return the directory where this application's OBB files (if there
are any) can be found.
Return the full path to this context's primary Android package.
Return PackageManager instance to find global package information.
Return the name of this application's package.
Return the full path to this context's primary Android package.
Return a Resources instance for your application's package.
( name, int mode)
Retrieve and hold the contents of the preferences file 'name', returning
a SharedPreferences through which you can retrieve and modify its
Return the handle to a system-level service by name.
Return the Theme object associated with this Context.
This method is deprecated.
This method is deprecated.
This method is deprecated.
( toPackage,
uri, int modeFlags)
Grant permission to access a specific Uri to another package, regardless
of whether that package has general permission to access the Uri's
content provider.
Indicates whether this Context is restricted.
Open a private file associated with this Context's application package
for reading.
( name, int mode)
Open a private file associated with this Context's application package
for writing.
( name, int mode,
Open a new private SQLiteDatabase associated with this Context's
application package.
( name, int mode,
errorHandler)
Open a new private SQLiteDatabase associated with this Context's
application package.
This method is deprecated.
( receiver,
Register a BroadcastReceiver to be run in the main activity thread.
( receiver,
broadcastPermission,
scheduler)
Register to receive intent broadcasts, to run in the context of
scheduler.
Remove the data previously sent with ,
so that it is as if the sticky broadcast had never happened.
( uri, int modeFlags)
Remove all permissions to access a particular content provider Uri
that were previously added with .
Broadcast the given intent to all interested BroadcastReceivers.
receiverPermission)
Broadcast the given intent to all interested BroadcastReceivers, allowing
an optional required permission to be enforced.
receiverPermission,
resultReceiver,
scheduler, int initialCode,
initialData,
initialExtras)
Version of
that allows you to
receive data back from the broadcast.
receiverPermission)
Broadcast the given intent to all interested BroadcastReceivers, delivering
them one at a time to allow more preferred receivers to consume the
broadcast before it is delivered to less preferred receivers.
that is "sticky," meaning the
Intent you are sending stays around after the broadcast is complete,
so that others can quickly retrieve that data through the return
value of .
resultReceiver,
scheduler, int initialCode,
initialData,
initialExtras)
Version of
that allows you to
receive data back from the broadcast.
(int resid)
Set the base theme for this context.
This method is deprecated.
This method is deprecated.
( intents)
Launch multiple new activities.
Launch a new activity.
( className,
profileFile,
arguments)
Start executing an
fillInIntent, int flagsMask, int flagsValues, int extraFlags)
Like , but taking a IntentSender
( service)
Request that a given application service be started.
Request that a given application service be stopped.
Disconnect from an application service.
( receiver)
Unregister a previously registered BroadcastReceiver.
From class
( service,
conn, int flags)
Connect to an application service, creating it if needed.
( permission)
Determine whether the calling process of an IPC or you have been
granted a particular permission.
( uri, int modeFlags)
Determine whether the calling process of an IPC or you has been granted
permission to access a specific URI.
( permission)
Determine whether the calling process of an IPC you are handling has been
granted a particular permission.
( uri, int modeFlags)
Determine whether the calling process and user ID has been
granted permission to access a specific URI.
( permission, int pid, int uid)
Determine whether the given permission is allowed for a particular
process and user ID running in the system.
( uri, int pid, int uid, int modeFlags)
Determine whether a particular process and user ID has been granted
permission to access a specific URI.
readPermission,
writePermission, int pid, int uid, int modeFlags)
Check both a Uri and normal permission.
This method is deprecated.
( packageName, int flags)
Return a new Context object for the given application name.
Returns an array of strings naming the private databases associated with
this Context's application package.
Delete an existing private SQLiteDatabase associated with this Context's
application package.
Delete the given private file associated with this Context's
application package.
( permission,
If neither you nor the calling process of an IPC you are
handling has been granted a particular permission, throw a
( uri, int modeFlags,
If the calling process of an IPC or you has not been
granted permission to access a specific URI, throw .
( permission,
If the calling process of an IPC you are handling has not been
granted a particular permission, throw a .
( uri, int modeFlags,
If the calling process and user ID has not been granted
permission to access a specific URI, throw .
( permission, int pid, int uid,
If the given permission is not allowed for a particular process
and user ID running in the system, throw a .
( uri, int pid, int uid, int modeFlags,
If a particular process and user ID has not been granted
permission to access a specific URI, throw .
readPermission,
writePermission, int pid, int uid, int modeFlags,
Enforce both a Uri and normal permission.
Returns an array of strings naming the private files associated with
this Context's application package.
Return the context of the single, global Application object of the
current process.
Return the full application info for this context's package.
Return an AssetManager instance for your application's package.
Returns the absolute path to the application specific cache directory
on the filesystem.
Return a class loader you can use to retrieve classes in this package.
Return a ContentResolver instance for your application's package.
Returns the absolute path on the filesystem where a database created with
is stored.
( name, int mode)
Retrieve, creating if needed, a new directory in which the application
can place its own custom data files.
Returns the absolute path to the directory on the external filesystem
(that is somewhere on
where the application can
place cache files it owns.
Returns the absolute path to the directory on the external filesystem
(that is somewhere on ) where the application can
place persistent files it owns.
Returns the absolute path on the filesystem where a file created with
is stored.
Returns the absolute path to the directory on the filesystem where
files created with
are stored.
Return the Looper for the main thread of the current process.
Return the directory where this application's OBB files (if there
are any) can be found.
Return the full path to this context's primary Android package.
Return PackageManager instance to find global package information.
Return the name of this application's package.
Return the full path to this context's primary Android package.
Return a Resources instance for your application's package.
( name, int mode)
Retrieve and hold the contents of the preferences file 'name', returning
a SharedPreferences through which you can retrieve and modify its
(int resId)
Return a localized string from the application's package's
default string table.
(int resId,
formatArgs)
Return a localized formatted string from the application's package's
default string table, substituting the format arguments as defined in
Return the handle to a system-level service by name.
(int resId)
Return a localized, styled CharSequence from the application's package's
default string table.
Return the Theme object associated with this Context.
This method is deprecated.
This method is deprecated.
This method is deprecated.
( toPackage,
uri, int modeFlags)
Grant permission to access a specific Uri to another package, regardless
of whether that package has general permission to access the Uri's
content provider.
Indicates whether this Context is restricted.
(int[] attrs)
Retrieve styled attribute information in this Context's theme.
( set, int[] attrs)
Retrieve styled attribute information in this Context's theme.
(int resid, int[] attrs)
Retrieve styled attribute information in this Context's theme.
( set, int[] attrs, int defStyleAttr, int defStyleRes)
Retrieve styled attribute information in this Context's theme.
Open a private file associated with this Context's application package
for reading.
( name, int mode)
Open a private file associated with this Context's application package
for writing.
( name, int mode,
Open a new private SQLiteDatabase associated with this Context's
application package.
( name, int mode,
errorHandler)
Open a new private SQLiteDatabase associated with this Context's
application package.
This method is deprecated.
( receiver,
Register a BroadcastReceiver to be run in the main activity thread.
( receiver,
broadcastPermission,
scheduler)
Register to receive intent broadcasts, to run in the context of
scheduler.
Remove the data previously sent with ,
so that it is as if the sticky broadcast had never happened.
( uri, int modeFlags)
Remove all permissions to access a particular content provider Uri
that were previously added with .
Broadcast the given intent to all interested BroadcastReceivers.
receiverPermission)
Broadcast the given intent to all interested BroadcastReceivers, allowing
an optional required permission to be enforced.
receiverPermission,
resultReceiver,
scheduler, int initialCode,
initialData,
initialExtras)
Version of
that allows you to
receive data back from the broadcast.
receiverPermission)
Broadcast the given intent to all interested BroadcastReceivers, delivering
them one at a time to allow more preferred receivers to consume the
broadcast before it is delivered to less preferred receivers.
that is "sticky," meaning the
Intent you are sending stays around after the broadcast is complete,
so that others can quickly retrieve that data through the return
value of .
resultReceiver,
scheduler, int initialCode,
initialData,
initialExtras)
Version of
that allows you to
receive data back from the broadcast.
(int resid)
Set the base theme for this context.
This method is deprecated.
This method is deprecated.
( intents)
Launch multiple new activities.
Launch a new activity.
( className,
profileFile,
arguments)
Start executing an
fillInIntent, int flagsMask, int flagsValues, int extraFlags)
Like , but taking a IntentSender
( service)
Request that a given application service be started.
( service)
Request that a given application service be stopped.
Disconnect from an application service.
( receiver)
Unregister a previously registered BroadcastReceiver.
From class
Creates and returns a copy of this Object.
Compares this instance with the specified object and indicates if they
are equal.
Called before the object's memory is reclaimed by the VM.
Returns the unique instance of
that represents this
object's class.
Returns an integer hash code for this object.
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
Returns a string containing a concise, human-readable description of this
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
From interface
( newConfig)
Called by the system when the device configuration changes while your
component is running.
This is called when the overall system is running low on memory, and
would like actively running process to try to tighten their belt.
From interface
(int keyCode,
Called when a key down event has occurred.
(int keyCode,
Called when a long press has occurred.
(int keyCode, int count,
Called when multiple down/up pairs of the same key have occurred
(int keyCode,
Called when a key up event has occurred.
From interface
Hook you can supply that is called when inflating from a LayoutInflater.
From interface
Version of
that also supplies the parent that the view created view will be
placed in.
From interface
Called when the context menu for this view is being built.
From interface
Called to process key events.
Called to process a key shortcut event.
Called to process population of s.
Called to process touch screen events.
Called to process trackball events.
Called when an action mode has been finished.
Called when an action mode has been started.
Called when the window has been attached to the window manager.
This hook is called whenever the content view of the screen changes
(due to a call to
(int featureId,
Initialize the contents of the menu for panel 'featureId'.
(int featureId)
Instantiate the view to display in the panel for 'featureId'.
Called when the window has been attached to the window manager.
(int featureId,
Called when a panel's menu item has been selected by the user.
(int featureId,
Called when a panel's menu is opened by the user.
(int featureId,
Called when a panel is being closed.
(int featureId,
Prepare a panel to be displayed.
Called when the user signals the desire to start a search.
This is called whenever the current window attributes change.
(boolean hasFocus)
This hook is called whenever the window focus changes.
( callback)
Called when an action mode is being started for this window.
DEFAULT_KEYS_DIALER
DEFAULT_KEYS_DISABLE
DEFAULT_KEYS_SEARCH_GLOBAL
DEFAULT_KEYS_SEARCH_LOCAL
DEFAULT_KEYS_SHORTCUT
RESULT_CANCELED
RESULT_FIRST_USER
FOCUSED_STATE_SET
Public Constructors
Public Methods
addContentView
closeContextMenu
closeOptionsMenu
createPendingResult
(int requestCode,
data, int flags)
dismissDialog
dispatchKeyEvent
dispatchKeyShortcutEvent
dispatchPopulateAccessibilityEvent
dispatchTouchEvent
dispatchTrackballEvent
findViewById
finishActivity
(int requestCode)
finishActivityFromChild
( child, int requestCode)
finishFromChild
getActionBar
getApplication
getCallingActivity
getCallingPackage
getChangingConfigurations
getComponentName
getCurrentFocus
getFragmentManager
getLastNonConfigurationInstance
getLayoutInflater
getLoaderManager
getLocalClassName
getMenuInflater
getPreferences
(int mode)
getRequestedOrientation
getSystemService
getTitleColor
getVolumeControlStream
getWallpaperDesiredMinimumHeight
This method is deprecated. Use
getWallpaperDesiredMinimumWidth
This method is deprecated. Use
getWindowManager
hasWindowFocus
invalidateOptionsMenu
isChangingConfigurations
isFinishing
isTaskRoot
managedQuery
projection,
selection,
selectionArgs,
sortOrder)
This method is deprecated. Use
moveTaskToBack
(boolean nonRoot)
onActionModeFinished
onActionModeStarted
onAttac}

我要回帖

更多关于 non consuming 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信