gpt4 book ai didi

android - 如何在android 4.2.2 中更改操作栏的高度

转载 作者:太空宇宙 更新时间:2023-11-03 11:50:27 25 4
gpt4 key购买 nike

是否可以更改操作栏的高度?我尝试使用 ActionBar.setCustomView(view, layoutparams) 但无法更改高度。请提出建议。我们将不胜感激。

最佳答案

要设置 ActionBar 的高度,您可以在 res/values 文件夹中创建一个新文件 themes.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.FixedSize" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="actionBarSize">48dip</item>
<item name="android:actionBarSize">48dip</item>
</style>
</resources>

并将此主题设置为您的 Activity :

android:theme="@style/Theme.FixedSize"

关于android - 如何在android 4.2.2 中更改操作栏的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18670519/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com