We are trying to build an Android App for Samsung Galaxy Tablets. Is there a way we can increase the height of the ActionBar? We are using Android 3.1 API 12.
Android ActionBar is a menu bar that runs across the top of the activity screen in android. Android ActionBar can contain menu items which become visible when the user clicks the “menu” button. In general an ActionBar consists of the following four components: App Icon: App branding logo or icon will be displayed here.
In Android applications, ActionBar is the element present at the top of the activity screen. It is a salient feature of a mobile application that has a consistent presence over all its activities. It provides a visual structure to the app and contains some of the frequently used elements for the users.
What is the difference between the toolbar and the action bar? The most obvious difference between the two is the updated visual design of the toolbar. The toolbar no longer includes an icon on the left side and decreases some of the spacing between the action items on the right side.
If you want to hide Action Bar from the entire application (from all Activities and fragments), then you can use this method. Just go to res -> values -> styles. xml and change the base application to “Theme. AppCompat.
You can apply a custom theme to your application.
Create styles.xml in your res/values/ directory and add something like this:
<style name="CustomTheme" parent="android:style/Theme">
<item name="android:actionBarSize">@dimen/action_bar_default_height</item>
</style>
Then create dimens.xml in your res/values/ directory and add something like this:
<resources>
<dimen name="action_bar_default_height">55dp</dimen>
</resources>
Then in your application manifest set the theme of the application like this:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:logo="@drawable/ic_launcher"
android:theme="@style/CustomTheme" >
...
</application>
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