Top "Android-context" questions

Interface to global information about an application environment

How to get Activity reference in View class?

I created an custom view and there require Activity reference to perform some Handler related operation. I have idea about …

android android-activity view android-context
How to Correctly Extend LinearLayout to Create a Custom View

I have some "card", which is a simple LinearLayout with a TextView inside <LinearLayout xmlns:android="http://schemas.android.…

android android-layout android-fragments android-linearlayout android-context
Accessing Resources without a Context

I'm trying to put configuration, such as URLs/etc, into a resource folder for a utility class to use. However, …

java android android-resources android-context
Add Context Menu Icon in android

I have a Listview with a ContextMenu, but when I setIcon for ContextMenu look like it doesn't work public void …

android icons android-context
Best practice to pass Context to non-activity classes?

So, my first major application is almost coded and I'm doing optimizations on my code. The app works fine, but …

android android-activity android-context
Android Intent Context Confusing

Can somebody explain this to me please : Intent intent = new Intent(Context, AlarmReceiver.class); I never understood and I seriously …

java android android-intent android-context
Android AsyncTask context behavior

I've been working with AsyncTasks in Android and I am dealing with an issue. Take a simple example, an Activity …

android multithreading android-asynctask android-context
Android Asyntask: Use weak reference for context to avoid device rotate screen

In Apress Pro Android 4 the author has said that: [...] context of currently running activity will no longer be valid when …

java android weak-references android-context
How to access Activity UI from my class?

I have an activity which creates an object instance of my class: file MyActivity.java: public class MyActivity extends Activity { …

android android-context
Finish the calling activity when AsyncTask completes

My calling activity: public class Hello extends Activity { public void onCreate(Bundle savedInstanceState) { MyTask mt = new MyTask(this); mt.execute(); } …

android android-asynctask android-activity android-context