Question

I have an app that uses an ActivityGroup and FrameLayout to show activities and tabs. Everything works fine on devices pre android 4.0. However, when using a device with 4.x the tabs are not showing. It's just a gray area.

Does anyone have any idea why this happens? I know that ActivityGroup is deprecated, but it should still be working on > 4.0 right? Or do you have to do it in another way? (the app is not worth changing everything to fragments)

I've included screens that shows what I mean.

Thanks! -Rob!

Edit; The app is using TabHost and TabWidget for this purpose. I didn't really clarify that.

pre android 4.0

post android 4.0

Was it helpful?

Solution

For you who are interested, I found a solution to my problem.

In the TabWidget class (which extends LinearLayout) I removed the overriding of the setDividerDrawable() method. For some reason this method wasn't even called when running on devices < 4.0, thus having no impact on the application. But when running the app on a 4.0+ this method was called, and the divider was basically not set and the whole TabWidget got screwed up.

Why this happens I have no idea, so if anyone knows why, please feel free to enlighten the rest of us :)

Hope this will help someone else too.

Cheers!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top