normal Activity switching to TabActivity - android

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/

Related

An Activity with two different Activities as Parent

I have an Activity DetailsActivity that is accessible from two different Activities: MapActivity and ListActivity. How should I implement Up Navigation to select proper Activity as Parent?
You can set a flag while going into the details activity from any one of the activities. Then onBackPressed you can fire that particular intent depending on the flag you first sent in.
I had the same problem and in my case rearanging the code worked perfectly. If you have the same logic in two classes, rather then inheritance, try to create another class, which will do the whole work for us.
Simple add a new atribute to Details Activity and (List Activity or Map Activity).

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 do i add activity within activity?

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/

How to stop loading data again while using intent to navigate activity?

I have three activities in my application ... I use an intent to navigate between the activities.
My third activity contains a method that fetch data from a web service.
When I press back button on the 3rd activity I go back to the second activity. But when I again come to 3rd activity from the second activity it starts downloading data again.
Please help me!
I am using handler in my 3rd screen..
Second activity uses following code
Intent intent=new Intent(Screen2.this,Screen3.class);
startActivity(intent);
Thanks in advance guys.
Try this link: Android Intents - Tutorial.
Using this tutorial
startActivityForResult();
Make use of savedInstance bundle....
Get more info from
Saving Android Activity state using Save Instance State
First finish the second activity moving to the third activity.
From third activity call the second 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