Prototik / HoloEverywhere

NO LONGER MAINTAINED. DEVELOP FOR 4.X+ DUDE.
MIT License
2.18k stars 607 forks source link

setting TabFragment removes ActionBar in android 2.3 -> R.id.content is present twice #812

Closed DEvil0000 closed 10 years ago

DEvil0000 commented 10 years ago

using current lib version 2.1. working fine on android 4.2 fails on android 2.3 when setting up a activity view with actionbar and tabs i use the following code to add a tab.

mFragment = Fragment.instantiate(mActivity, fragmentClass.getName()); ft.replace(android.R.id.content, mFragment, mTag);

but android.R.id.content is present 2 times in the tree. the first one is org.holoeverywhere.widget.FrameLayout holding a LinearLayout with the ActionBar containers and the real content... the second one is the correct lowest element android.support.v4.app._HoloActivity in the default tree...

Prototik commented 10 years ago

Use app-scope id instead (R.id.content, not android.R.id.content)

DEvil0000 commented 10 years ago

sure i can work around this with a own content id but it is a true holoeverywhere bug so why don't just fix it..