Tag: android-activity

How to implement multi-windowed layout (like the default browser) (Editor with several open files)

I am writing an editor (of sorts) which I want to be able to have multiple windows open at the same time, and I want to be able to navigate between windows as can be done in the default browser (Internet) application. See picture: http://i.imgur.com/LM6Nz.png for clarification. My question is how to implement these windows; […]

Data passing to another application in Android

I have two Android Application(Application A,Application B) as shown in below figure. I want to call application B by clicking on Button from first Application A and when Application B launches then the text box will contain the text which I want to pass from Application A. **Note- I have access of Application A so […]

Running a custom animation between Android Activities

So I know you can use your own animation between activities using the overidePendingTransition method. I set up a transition between two activites and it works perfect on my emulator but I see no transition when I flash the app on to my phone. How can this be? My emulator is running 2.2 as is […]

Android return data to previous activity

I need you help: I want to putExtra data to the previous activity before finishing the current activity. Eg: Activity A start Activity B When I finish Activity B I want in Activity A new data. How I can do that? Many thanks before

Start MAIN activity of the current application without knowing it's name

I am trying to write an utility method, that would be able to start activity (belonging to current application) marked as “android.intent.action.MAIN”. The utility method should not accept any parameters. Desired code: public void startMainActivity(Context context) { … } Manifest: <activity android:name=”.MainActivity”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity> Any ideas?

State of Activity while in onActivityResult question

I have a question about the Activity’s state while in onActivityResult. Specifically, is it ‘guaranteed’ that either onRestoreInstanceState or onCreate have been called prior to onActivityResult for an Activity? In other words, is it safe to assume that the state data (member variables and such) of the Activity are ‘usable’ while in onActivityResult (assuming you […]

Android return object as a activity result

Is it possible to return object as a activity result from child activity to parent? Just something like: Intent resultIntent = new Intent(null); resultIntent.putExtra(“STRING_GOES_HERE”, myObject); setResult(resultIntent); finish(); If it is possible, how should I retrieve myObject in parent activity? I figured out, that to retrieve data I need to do something like this: protected void […]

Finishing all activities started before the activity

I want to finish all the activities which are running in the application means want to remove all the parent activities from stack. I want to implement logout functionality locally in my application so what I was thinking, I will finish all the activities started before and will start login activity again..

How to clear previous activity stack and Exit Application on back button?

friends, i have three activities A,B,C A is home screen. Activities are launched as follow A->B->C if i come to home screen using backbutton i want to clear activity stack/previous activities history and it should exit the application. any one guide me how to achieve this?

How to restart the onCreate function

I have an application and there are certain conditions when I want my activity to be recreated or the onCreate function is needed to be called so that different functions can be performed again. Just like when the orientation of the device changes and the oncreate function is recalled or the activity is recreated, in […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.