views:

27

answers:

1

I am using Eclipse and developed an app that has 3 tabs using Android 1.5. The program works just fine. 1st problem--whenever the app is run, it change orientations, but does not show the scroll bars, thus allowing to scroll down(or up). Is this suppose to be happening? And how is it corrected?

2nd problem--if you are on say tab2, then open or close the key board (T-Mobile G1), the tab2 switches to tab1. No matter if you are one tab1 or tab2, opening/closing the keyboard will switch it back to tab1. Does anyone know what the fix is?

Thanks for all the help and assistance, [email protected]

A: 
  1. Ivestigate usage of ScrollView http://developer.android.com/intl/zh-TW/reference/android/widget/ScrollView.html
  2. I guess on keyboard open/close your activity is recreated (not sure though), try saving your tabs state (e.g. index oof selected tab) http://developer.android.com/intl/zh-TW/reference/android/app/Activity.html#onSaveInstanceState%28android.os.Bundle%29 and restoring it during onCreate.
Konstantin Burov