I have some questions about the Android method and terminology.

Asked 2 years ago, Updated 2 years ago, 115 views

1 Answers

Let me explain what I understand. Look for more

In Android, Context is an object that has rough information such as Application or Activity. If you're curious about the information that the method brings, take a picture at the back and look at it using assist.

Activity.getApplicationContext() is used to get information about the entire application that contains the current activity. This method remains in memory for some time after the app is shut down.

Use ContextWrapper.getBaseContext() to access the context of other activities.

There is one more method to get the context. View.getContext(). Gets the context of the currently in use view. Features such as ActivityName.this or this.


2022-09-22 21:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.