Android 5.0: How to Change Recent Apps Title Color

Android 5.0: how to change recent apps title color?

You can't force the text color, it is auto generated (either white/black) based on your colorPrimary color.

Setting header color of app in overview (recent apps) screen

You can change this via ActivityManager.TaskDescription:

https://developer.android.com/reference/android/app/ActivityManager.TaskDescription.html

From an Activity context, call:

TaskDescription taskDescription = new TaskDescription(label, icon, colorPrimary);
((Activity)this).setTaskDescription(taskDescription);

How to change the title color of app background?

So simple, go to res/values/colors.xml file and change the colorPrimary to what color you want:

<color name="colorPrimary">YOUR_REQUIRED_COLOR_HERE</color>

If you need in JAVA, you can also use the answer that @mohammadRezaAbiri gave:

Bitmap bm = BitmapFactory.decodeResource(getResources(), app_icon);
TaskDescription taskDesc = new TaskDescription(getString(R.string.app_name), bm, getResources().getColor(R.color.primary_600));
MainActivity.setTaskDescription(taskDesc);

How to change app color in Samsung S6/Android 5.0 recent apps?

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

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

Next set a colourPrimary inside your theme like so:

<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.

How do I change color of app title bar in recents apps menu?

I found the solution! It's the "color" property of MaterialApp widget. Thank you all for your participation! :) Also, the name of this thing is "app bar in apps switcher" (or apps recents).

Here the result:

MaterialApp(
title: 'Аквамарин',
theme: theme,
color: Colors.white // this one
)

change app switcher color

Eliminate or Change the action bar seen on the recent apps screen

I don't think it is possible to remove the AppBar under app manager screen but you can certainly change the color of it.

Android will use <item name="colorPrimary">@color/colorPrimary</item> in your App Theme to select the color of AppBar under app manager screen or you can say header color.

You can either change that <item name="colorPrimary">@color/colorPrimary</item> to your desired color that you want but it will impact your whole app because android will use that primaryColor on many different places in your app.

An other option you have is to set that header color in your code using TaskDescription class. Code will be as follows -

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Bitmap bitmapIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
ActivityManager.TaskDescription taskDescription =
new ActivityManager.TaskDescription(getString(R.string.app_name), bitmapIcon, getColor(R.color.colorHeaderColor));
this.setTaskDescription(taskDescription);

// more code here........

}
}

Value of R.color.colorHeaderColor can be desired color. Result will be as follows -

Sample Image

Happy Coding !

Android 5.0: howto change Overview Screen Task Title background color

In general, if you're targeting Material then you should set colorPrimary (action bar, recents), colorPrimaryDark (status bar), and colorAccent (check boxes, progress bars, etc) in your theme.

That said, you can dynamically change the recents color to be something else using:

TaskDescription taskDesc = new TaskDescription(myTitle, myIcon, myColor);
myActivity.setTaskDescription(taskDesc);

React Native: how to change recent apps background title color on Android?

1.Create colors.xml into android/app/src/main/res/values/colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Change the color value for your need -->
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

2.Modify the styles.xml inside android/app/src/main/res/values/styles.xml

<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

3.The result and more detail about Android Style and Theme:

Android color theme

How do I change the color of this bar when switching apps?

You can use setTaskDescription() to achieve this:

setTaskDescription(new ActivityManager.TaskDescription(label, icon, color));

For android documentation:

Sets information describing the task with this activity for
presentation inside the Recents System UI. When getRecentTasks(int,
int) is called, the activities of each task are traversed in order
from the topmost activity to the bottommost. The traversal continues
for each property until a suitable value is found. For each task the
taskDescription will be returned in ActivityManager.TaskDescription.

Parameters taskDescription The TaskDescription properties that
describe the task with this activity

https://developer.android.com/reference/android/app/Activity.html#setTaskDescription(android.app.ActivityManager.TaskDescription)



Related Topics



Leave a reply



Submit