How do i add activity within activity? - android

i'm trying to make an app for nexus 7.
how can i display multiple activity to red area when the button is clicked??
Btn_A call activity A
Btn_B call activity B
Btn_C call activity C
Btn_D call activity D
i'm really need a example for this.

You should use fragments in this case.
You can find some useful examples in the API demos.

Tab activity is the best for that scenario. Please read the below link for tab activity.
http://www.androidhive.info/2011/08/android-tab-layout-tutorial/

Related

How to change views in android

Consider we have two Activies: Activity A and Activity B, both have an ImageView. If we click on ImageView in Activity A, ImageView in Activity B should change to another image. Please tell us, how to achieve this by using interface
Your timely suggestions will help us a lot
Send some info about the clicked image in Activity A to Activity B using Intent. Then based on that info show the corresponding image in Activity B
As i understand what you are asking for has been asked many times. Its how to send data between activities. Here is an answer from another thread. Also you can check the Android documentation and read about bundles.

Intent.FLAG_ACTIVITY_FORWARD_RESULT Live Example In Android

Can any one tell me the the working of Intent.FLAG_ACTIVITY_FORWARD_RESULT Live Example
now what I am doing just creating three activity that are A,B,C
so When I am Launching Application from activity A and from A I am Starting Activity B with startActivityForResult(Activity B) and there In B Activity I am starting activity C with Intent.FLAG_ACTIVITY_FORWARD_RESULT and finishing B Activity,so now from there in Activity C When I finished to Activity C it gives result back to the Activity A in onActivityResult().
So i want to know that is this the purpose of using this flag or that is something different and if I am wrong please let me know.
and please try to give answer with example.
Virendra, your assumptions are correct. This gist demonstrates a simple use case: https://gist.github.com/mcelotti/cc1fc8b8bc1224c2f145. Please note the use of setResult() in ActivityC before it is finished.
The solution is already on the stackoverflow .I hope you may understand the logic .
I suggest you to go with this solution flag activity #stackoverflow.

How to call startActivityForResult from ActivityGroup

I am using tab widget and each tab belong to a activity group. An activity group has several sub activities.The sub activites are added to the activity group via LocalActivityManager.startActivitY from activity group but now i want to use startActivityForResult from instead of startActivity. Can someone help me to accomplish that as LocalActivityManager class does not havestartActivityForResult method..
#Sabya i had been there in the same situation few weeks past. And i have found from my side that there is no way to use startActivityForResult in ActivityGroup. So i found some hacking type of technique to get out of this. First create a static variable of the result you want from startActivityforResult.After doing this,intent to a transparent Activity,in which you doing all those stuff of activityforResult.After getting value you set the value of the static variable that you created in the TabClass,After then finish the transparent Activity

normal Activity switching to TabActivity

I have 2 activity: A, B. The first is an normal Activity and the second an TabActivity. Inside A i have a clickable button that make an intent to call the TabActivity the output showing black screen..how to show the UI of both the screens?tell me the solution?i need code please help me?
Read the docs:
http://developer.android.com/reference/android/app/Activity.html#StartingActivities
or use this tutorial:
http://www.androidcompetencycenter.com/2009/03/tutorial-how-to-start-a-new-activity/

android activity transaction style?

i need to know whether transaction style is possible or not in android , for example if i launch the main activity i need to go or switch over to second activity ,i need some animation like popup , pop for left..etc , for next activity view. whether it is possible or not?
Use Intend to go another activity.
Intent intent = new Intent(SourceActivity.this, TagetActivity.class);
startActivity(intent);
Further to understand about intend:
http://www.castlerockresearch.in/dev/2010/08/understanding-intents-and-intent-filters-in-android/
For Pop up animation see this link:
http://android-codes-examples.blogspot.com/2011/04/animated-customized-popup-transparent.html
you could use Intents for switching between 2 activities.
For the animation part please look at this How to provide animation when calling another activity in Android?
This could also be useful:
anddev.org/animation_on_new_intent-t1207.html
BR,
mybecks

Categories

Resources