I apply a custom theme to my activity with: <activity android:theme="@style/MyTheme">
, in which I define the size of the ActionBarSherlock I use in this activity. Something like that:
<style name="MyTheme" parent="@style/Theme.Sherlock.Light.DarkActionBar">
<item name="actionBarSize">45dp</item>
<item name="android:actionBarSize">45dp</item>
</style>
While this size is good for portrait mode, I find it too big in landscape mode. How can I apply a different theme in landscape mode or how could I just change the action bar size when the user uses the application in landscape orientation? Any suggestions? Thank you.
Rotate your phone to change the screen orientation (if Auto Rotate is enabled). If Auto Rotate is enabled, your phone's screen will automatically flip to portrait mode when you are holding it upright. When you are holding it horizontally, it will automatically switch to Landscape mode.
create two different styles.xml. Put one into res/values-port and the other into res/values-land
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With