如何在Samsung S6 / Android 5.0最近的应用程序中更改应用程序颜色?

时间:2022-07-16 18:54:23

I was wondering, how would I change the color of its app menu tab on the Recent Apps screen? Example of apps in recent apps screen attached.

我想知道,如何在“最近的应用”屏幕上更改其应用程序菜单选项卡的颜色?附近最近的应用程序屏幕中的应用示例。

Using Android Studio.

使用Android Studio。

Thanks! 如何在Samsung S6 / Android 5.0最近的应用程序中更改应用程序颜色?

1 个解决方案

#1


0  

I believe this happens when you use either the new material theme, or the backwards compatible theme provided in the app compat library.

我相信当您使用新的材质主题或app compat库中提供的向后兼容主题时会发生这种情况。

Firstly make sure that your applications theme extends one of the Theme.AppCompat.* themes.

首先确保您的应用程序主题扩展了Theme.AppCompat。*主题之一。

Next set a colourPrimary inside your theme like so:

接下来在主题中设置colourPrimary,如下所示:

<style name="MyAppTheme" parent="Theme.AppCompat.Light">
    <item name="colorPrimary">@color/my_brand_red</item>
</style>

You can read more about the app compat theme on the android developers blog. In particular you might want to read up on the colorPrimary, colorPrimaryDark and colorAccent attributes.

您可以在Android开发人员博客上阅读有关app compat主题的更多信息。特别是您可能想要阅读colorPrimary,colorPrimaryDark和colorAccent属性。

#1


0  

I believe this happens when you use either the new material theme, or the backwards compatible theme provided in the app compat library.

我相信当您使用新的材质主题或app compat库中提供的向后兼容主题时会发生这种情况。

Firstly make sure that your applications theme extends one of the Theme.AppCompat.* themes.

首先确保您的应用程序主题扩展了Theme.AppCompat。*主题之一。

Next set a colourPrimary inside your theme like so:

接下来在主题中设置colourPrimary,如下所示:

<style name="MyAppTheme" parent="Theme.AppCompat.Light">
    <item name="colorPrimary">@color/my_brand_red</item>
</style>

You can read more about the app compat theme on the android developers blog. In particular you might want to read up on the colorPrimary, colorPrimaryDark and colorAccent attributes.

您可以在Android开发人员博客上阅读有关app compat主题的更多信息。特别是您可能想要阅读colorPrimary,colorPrimaryDark和colorAccent属性。