Activity states and back() implementation within a Tab and a whole app
<p>I have a question about 'managing' the application. I have tabs and a custom activity manager. What I'm interested in, is the states (transitions between activities). Basically, I override the <code>onKeyDown</code> method to customize the behavior of the app when I press on a 'back' button(the app is not tablet-oriented, so I guess I don't need a <code>onBackPressed</code> method...or do I?). I use numbers to know the state of every activity. At the beggining it was very convenient to substract 1 in order to return...But recently, when the app grows bigger, I've noticed it's very easy to lost in these numbers and you always have to pay attention how many numbers you need to substract in order to return to some specific state. So, I wanted to ask, how you guys manage activities in tab hosts? How do you manage activities within whole app which has a few tabs? What is the best way to implement <code>back</code> within one tab? Thanks!  </p>
