Reputation: 1889
I'm using a tabhost with three tab widgets, each hosting a View.
I want only one of those tabs to react to an orientation change.
I've tried registering for configChanges
on the Activity and overriding the onConfigurationChanged(..)
method. I then detected orientation using Display measurements and used setRequestedOrientation(..)
to change it.
It seem setRequestedOrientation(..)
only works once, then all other calls to it are ignored.
Any ideas how to do this?
Note: I'd rather not use Activities for each tab 1. because it wastes system resources and 2. I've tried it already and couldn't get this to work on that method either.
Upvotes: 1
Views: 343
Reputation: 3433
I believe this previous post may have several adequate answers to your question. One involves having a listener change the orientation on each tab click
and the other involves using setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER);
Upvotes: 2