Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to save a screen state in Android similar to the BackStack?
    primarykey
    data
    text
    <p>i m just wondering about some android ui aspects where i need some advices! Might be, that my idea so far is not the best...</p> <p>Basically I m working on an app, which plays streams in a player (<strong>main screen</strong>). The user can select streams in a second screen (<strong>tabbar screen</strong>), where he can switch between three different lists, each one is in one of the tabs and each tabbarclick starts a new activity (i m not using an <code>ActionBar</code> or sth, I just created an own UI element which consist of three icons, current one selected and the other two starting a new Activity): </p> <ul> <li><p><code>ListViewActivity1</code>: dynamically created ViewFlipper with nested ListViews (f.e. country->state->city..) from a database </p></li> <li><p><code>ListViewActivity2</code>: simple ListView with favorits from <code>ListViewActivity1</code></p></li> <li><code>ListViewActivity3</code>: simple ListView with UserGenerated content</li> </ul> <p>So far it s working great but I m starting to struggle... Everytime the user enters the <strong>tabbar screen</strong> again, I want him to be exactly at the last <code>ListView</code> where he was. So basically I m looking for a way to store the different screens if the user leaves them. I came across <code>onSaveInstanceState(Bundle savedInstanceState)</code>, but this doesn't really fit my needs. The <code>ListViewActivity 1</code> is a really complex list with up to six levels sometimes, which I really don't want to transport in a <code>savedInstanceState</code>! Is there another way?</p> <p>Actually if I go back in the <code>BackStack</code>, this really saves the different states like I want it to. So it is possible, I just don't find anything like this..</p> <p>So, <strong>question 1</strong>: Is there a way to save a view like the <code>BackStack</code> does?</p> <p><strong>question 2</strong>: Is this whole idea of ui-implementation a good solution to set up an app? </p> <p>thanks for any input!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload