ume*_*mar 5 android android-actionbar
我们正在尝试为三星Galaxy平板电脑构建Android应用程序.有没有办法可以增加ActionBar的高度?我们使用的是Android 3.1 API 12.
您可以将自定义主题应用于您的应用程序.
在res/values /目录中创建styles.xml并添加如下内容:
<style name="CustomTheme" parent="android:style/Theme">
<item name="android:actionBarSize">@dimen/action_bar_default_height</item>
</style>
Run Code Online (Sandbox Code Playgroud)
然后在res/values /目录中创建dimens.xml并添加如下内容:
<resources>
<dimen name="action_bar_default_height">55dp</dimen>
</resources>
Run Code Online (Sandbox Code Playgroud)
然后在您的应用程序清单中设置应用程序的主题,如下所示:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:logo="@drawable/ic_launcher"
android:theme="@style/CustomTheme" >
...
</application>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1992 次 |
| 最近记录: |