Nested activities question

by jb » Fri, 23 Apr 2010 00:48:09 GMT


Sponsored Links
 I have an application that allows the user to "drill-down" into data.
At each level of data the user can choose a Tableview item or a
Listview item. This will result in a startActivity() call for display
of new data.

I can get back to the top (Parent activity) by using the Back button,
which can take a while. Is there a way to "POP" back to the Parent
activity and dismiss all previously allocated activities, and not have
to go back through all the activities previously created?

TIA,

jb

--



Nested activities question

by ~ TreKing » Fri, 23 Apr 2010 01:48:27 GMT


 



See this thread:


Sponsored Links


Nested activities question

by krox » Fri, 23 Apr 2010 02:03:01 GMT


 Hi!

rootActivityIntent) with the flag FLAG_ACTIVITY_REORDER_TO_FRONT set
for rootActivityIntent. Hope this is what you were looking for, for
more information see:

 http://developer.android.com/reference/android/content/Intent.html #FLAG_ACTIVITY_REORDER_TO_FRONT

Cheers,
Erik



>



Other Threads

1. Regarding streaming files

If  i am using the streaming API's provided by the SDK that is
                        mMediaPlayer.setDataSource(url);
                        mMediaPlayer.prepareAsync();

If we are using this and if there are some max file transfer per connection
rules set by the connection provider,does the SDK automatically take care of
such issues where in different carriers have different file transfers per
connection limit.

What i really want to know is say i have an url for a song for streaming ,do
i need to send it in chunks because of the limitations of the carrier
settings.When is the program given in the following link useful otherwise?

http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/

Thanks!

--~--~---------~--~----~------------~-------~--~----~

2. Why there is an error when I doing unit test with ActivityInstrumentationTestCase2?

I am using ActivityInstrumentationTestCase2 to do some test for an
activity.
I get a button in the setUp() method like this:
protected void setUp() throws Exception {
        super.setUp();
        act = getActivity();
        ........
        btn = (Button)act.findViewById( R.id.bike_button ); // this
button has been defined in layout
 }
Then I use this button to perform a click in a test method like this:
public void testBikeButton(){
  //click the bike button
  btn.performClick();
  ......
}
When run it as android junit, there will be an error like this:
"android.view.ViewRoot$CalledFromWrongThreadException: Only the
original thread that created a view hierarchy can touch its views.
at android.view.ViewRoot.checkThread(ViewRoot.java:2440)
at android.view.ViewRoot.playSoundEffect(ViewRoot.java:2261)
at android.view.View.playSoundEffect(View.java:7457)
at android.view.View.performClick(View.java:2178)
at com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java:
40)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod
(InstrumentationTestCase.java:191)
at android.test.InstrumentationTestCase.runTest
(InstrumentationTestCase.java:181)
at android.test.ActivityInstrumentationTestCase2.runTest
(ActivityInstrumentationTestCase2.java:175)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151)
at android.test.InstrumentationTestRunner.onStart
(InstrumentationTestRunner.java:418)
at android.app.Instrumentation$InstrumentationThread.run
(Instrumentation.java:1520)"

How do I fix it?

--~--~---------~--~----~------------~-------~--~----~

3. android source cupcake build error

4. How to know software keyboard is on screen or not?

5. Why there is an error when I doing unit test with ActivityInstrumentationTestCase2?

6. Having a TextView auto complete with SearchSuggestions

7. akhirnya singtel G1 update ke 1.5