android - 如何从 fragment 动态更改 ActionBar 高度

标签 android android-actionbar

我有一个包含多个 fragment 的 Activity 。导航栏中的大多数链接通过事务替换了 fragment 。 Material 准则允许您调整高度以为更多按钮和文本腾出空间。 如何从 fragment 调整支持 ActionBar(不是工具栏)的高度?

enter image description here

最佳答案

将style.xml改为

 <style name="AppTheme" parent="AppBaseTheme">
       <item name="android:actionBarSize">70dp</item>

</style>

关于android - 如何从 fragment 动态更改 ActionBar 高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27098707/

相关文章:

android - NoClassDefFoundError: android.graphics.YuvImage(编译但不运行)

android - 使用操作栏与 TabHost 的选项卡

android - 当我返回到“Activity ”时,空间为空(强制使用软键盘)

Android:从 Fragment 更改 ActionBar 菜单项

Android ActionBar 搜索字段

android - 批量上下文操作模式

android - 使用 jetpack compose 突出顶部应用栏

android - 来自示例应用程序的良好动态致命异常

android - 如何在 Genymotion 虚拟设备上安装 Google 框架(Play、Accounts 等)?

android - 如何更新我的 android 应用程序中的数据?