1

Hi i created one customised tab bar with three tabs. I loaded one tab with google link, another with the small hello world app and another with the layout which has design for different screen resolutions. When i tap on the third tab it is showing an error "Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'". But it is not showing that error when i load the third tab with small app. Why is it happening like that? Can any one help me?

Error:

12-08 11:50:52.004: ERROR/ACRA(1738): El Gifto fatal error : Unable to start activity ComponentInfo{com.ibkr.elgifto/com.ibkr.elgifto.Ehome}: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
12-08 11:50:52.004: ERROR/ACRA(1738): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ibkr.elgifto/com.ibkr.elgifto.Ehome}: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
12-08 11:50:52.004: ERROR/ACRA(1738): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
12-08 11:50:52.004: ERROR/ACRA(1738):     at android.app.TabActivity.onContentChanged(TabActivity.java:105)
12-08 11:50:52.004: ERROR/ACRA(1738):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:210)
12-08 11:50:52.004: ERROR/ACRA(1738):     at android.app.Activity.setContentView(Activity.java:1657)
12-08 11:50:52.004: ERROR/ACRA(1738):     at com.ibkr.elgifto.Ehome.onCreate(Ehome.java:132)

thanks

Sam
  • 86,580
  • 20
  • 181
  • 179
naresh
  • 10,332
  • 25
  • 81
  • 124

1 Answers1

4

If you are going to use TabActivity, you need to use @android:id/tabhost as the android:id value of your TabHost in your xml layout file

Houcine
  • 24,001
  • 13
  • 56
  • 83