cost 174 ms
使用 ActionBar 的 Tablayout 的滚动行为无法正常工作

[英]Scroll behaviour of Tablayout with ActionBar is not working properly

我正在尝试实现类似whatsApp的行为。 预期行为:当用户滚动列表时, Tablayout随着操作栏向上滚动。 ActionBar隐藏并Tablayout代替它。 发生了什么: ActionBar和Tablayout一切正常,但是当向上滚动时Tablayout的位置被空白占据。 截图 1 ,截图 ...

为什么我的应用程序在调用“setupActionBarWithNavController(navController, appBarConfiguration)”时会崩溃

[英]Why does my app crash invoking “setupActionBarWithNavController(navController, appBarConfiguration)”

我在 Android Studio 的 LogCat window 中收到错误消息; 当我运行包含以下代码的应用程序时: 应用程序到达线路时崩溃; ...

Android:我在操作栏中设置了一些图标,但它们没有显示在我的设备上

[英]Android: I set some icons in the actionbar, but they were not shown on my device

我想在我的操作栏中添加一些操作。 在我的设计预览中显示了图标,但在我的设备上,操作栏中没有显示图标。 为了在操作栏中显示图标,我必须进行哪些更改? menu_main.xml MainActivity.java activity_main.xml MainActivity.java: ...

如何使用调色板库设置操作栏的颜色?

[英]How do I set the color of the action bar using palette library?

我有一个 bitmap 用于在 imageview 中显示来自 firebase 的图像。 我希望状态栏和操作栏的 colors 都可以通过数据库中图片的鲜艳颜色进行调整。 我搜索了如何做到这一点,并在下面有以下代码 但是我在获取操作栏的代码行上出现错误,说“设置背景可绘制不能应用于 int”当我 ...

将图像添加到默认的 android 应用操作栏

[英]Add an image to the default android app action bar

实际上,我的 android 应用程序的活动中有这个屏幕。 我希望在左上角的文本“Stone”的左侧添加一个图像,该图像包含在应用程序的默认操作栏中(这是默认主题)。 在顶部,有活动布局 XML 文件。 这是我的 styles.xml 文件: 我尝试了许多解决方案,但没有任何效果,我希望更改应用程 ...

继承 Theme.AppCompat.DayNight 后更改 ActionBar 文本颜色

[英]Change ActionBar text color after inheriting Theme.AppCompat.DayNight

我正在实施对暗模式的支持。 但是在我将 Theme parent 更改为Theme.AppCompat.DayNight后,Action Bar 中的文本为黑色(白天模式下为黑色,深色模式下为白色)。 我希望文本始终是白色的。 我试图更改 styles.xml 中的文本颜色(值和值-夜间) 但它不工 ...

MaterialComponents 操作栏文本不能小写? (textAllCaps 不起作用)

[英]MaterialComponents actionbar text cannot be made lowercase? (textAllCaps does not work)

我正在使用这个主题Theme.MaterialComponents 。 我的问题是我添加了一些菜单,它是简单的可点击文本,在操作栏上显示为大写(见下图): 我的资源文件包含以下文本: 我尝试将actionMenuTextAppearance styles 添加到我的主题中: 其中MyMenuTex ...

Actionbar 和 statusbar 之间的间隙,非半透明

[英]Gap between Actionbar and statusbar, non translucent

我在状态栏和操作栏之间有一个间隙,只是无法将它移到 go 之外。 我玩过 android:fitsSystemWindows 和下面的例子。 我通过 AppCompatActivity 使用 supportActionBar。 它使用导航组件进行设置: 显示的片段很简单,带有一个没有任何 andro ...

如何使用 Kotlin 从内部 fragment_name.kt 源文件访问 supportActionBar

[英]How Can I access supportActionBar from Inside fragment_name.kt Source File with Kotlin

在我的MainActivity.kt文件中,我可以访问supportActionBar.title并设置标题。 在TitleScreenFragment.kt中,我无法访问: 当我尝试只使用activity.actionBar.title时,该值为 null。 如何从我的片段代码中访问activi ...

带有 MaterialComponents 主题的 ActionBar 背景

[英]ActionBar background with MaterialComponents theme

我想自定义我的 ActionBar。 我的主题如下所示: 在值文件夹中: 在 values-night 文件夹中: 不知道为什么我的 ActionBar 背景颜色没有相应改变。 我也尝试以不同的其他方式改变我的主题,但没有任何效果。 这是我的其他尝试: 我使用了actionBarTheme acti ...

与 AppTheme 冲突我的应用程序无法使用内置的 actionBar,但其中一个库需要 AppTheme 中的 actionBar

[英]Conflict with AppTheme my app cant use built-in actionBar but one of the library require actionBar in AppTheme

如果我在没有 ActionBar 的情况下使用 AppTheme,那么当我调用 WeAccept Payment SDK 时会崩溃,因为它们需要在 AppTheme 中使用 Actionbar。 我的代码: 在Manifest中我使用android:theme="@style/AppTheme.N ...

将 SupportActionBar 与 androidx FragmentActivity 一起使用

[英]Use SupportActionBar with androidx FragmentActivity

我想在我的 Android 应用程序中使用 Material Design 组件。 该应用程序已经使用 androidx 与以前版本的 Android 向后兼容,使用 SDK 28 编译。 我的应用程序中的所有活动都从BaseActivity class 扩展而来,后者又扩展androidx.fra ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM