Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android application icon changes with runtime

In my app I want to display different icons for the application. Changes should be according to the scenario. For example, it will mark the number of days remaining for the task completion. On the android menu this icon will display the number of days remaining. If anyone has any idea for this, I would appreciate it. Thanks.

like image 329
Neetesh Avatar asked May 18 '11 11:05

Neetesh


People also ask

Can I change app icon dynamically in Android?

In this article, we are going to learn how to change the App Icon of an App on the Button Click. This feature can be used when we have an app for different types of users. Then as per the user type, we can change the App Icon Dynamically.

How do you permanently change app icons?

Tap the app name whose icon you want to change. Select Icon from the settings menu that opens. The available icons for that app from the various icon packs installed on your phone appear under the Available Icons section. Select the one you like.

How do I make adaptive icons on Android?

Add your adaptive icon to your app xml , create alternative drawable resources in your app for backward-compatibility with Android 8.0 (API level 26). You can then use the <adaptive-icon> element to define the foreground, background, and monochromatic layer drawables for your icons.

How do I add icons to Mipmap Android?

Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Further follow the path to reach the desired folder to add icon (app → res → mipmap). Step 3 - Add you app icon. You can just simply copy and paste the image in mipmap folder.


2 Answers

There are actually a number of ways to achieve this. If you notice Google's clock app these days, it does show the current time.

You can refer to this tutorial: https://blog.jakelee.co.uk/programmatically-changing-app-icon/

Or find even more ways here: How to change an application icon programmatically in Android?

like image 196
Kamran Ahmed Avatar answered Oct 21 '22 02:10

Kamran Ahmed


As far as i know, you cant. Also refer to this answer:

Android Application Icon Change

like image 42
mudit Avatar answered Oct 21 '22 03:10

mudit