android application icon is white circle - android

I have made some icon for my app and I have tested it on some old Samsung galaxy phone and it showed the icon is a nice square shape.
For some reason, on a newer phone + on the Emulator it shows a white circle as follows:
My manifest file looks as follows:
<application
android:allowBackup="false"
android:icon="#mipmap/ic_launcher_custom"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_custom_foreground"
android:supportsRtl="false"
android:theme="#style/CustomActivityTheme">
and my mimap is:
How can I solve it please?
Thank you

Move the mipmap content out of the project
then create app icons with Asset studio (right click on project panel > new > Image Asset)
and set icons in manifest like this:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">

Related

Recent App Icon shows the default icon Android Studio

I've update the images both Round and square icon works perfectly but in the recent application the default app icon is showing.
Manifest.xml have following code
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:hardwareAccelerated="true"
android:logo="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">

Wrong icon and label app in Huawei Phone - how to fix that?

I got the following code to customize my app icon and label:
<application
tools:replace="android:icon"
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#drawable/appicon"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
Everything is all right, the correct icon and label show up in some phones (including brands like Samsung and Xiaomi), but when I install on a Huawei Mate 20 the result is the following image icon and label:
Do you know what I'm doing wrong? Thank you.
Most of the mobiles use round edged icon for the app icon. But other use with round app icons.Depends on the theme of the device(having a separate icon or same icon for both instances work). you should change the round app icon also :
android:roundIcon="#mipmap/ic_launcher_round"
to
android:roundIcon="#drawable/appicon"
and remove
tools:replace="android:icon"
it should look like
<application
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#drawable/appicon"
android:roundIcon="#drawable/appicon"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">

How to set launcher icon in android in API version greater than 25

How do I generate Android app launcher icon?
My Manifest file of my android app:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
I am using Android Studio 3.0.1. In mipmap folder I see many file for ic_launcher. Which file to change for the launcher icon?
Android requires different sizes for same icon so that it can automatically check which size is required for which device.
To add custom launcher icon to your app you have to create a icon with different sizes and add your them in mipmap folder.
Now change the icon name in menifiest file
for example you add a image named my_appicon.png and your roundedIcon name is my_appicon_round.png then in menifiest file
<application
android:allowBackup="true"
android:icon="#mipmap/my_appicon"
android:label="#string/app_name"
android:roundIcon="#mipmap/my_appicon_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
the roundIcon can also be same but if you want to provide round icon for your app you can do this using
roundIcon property.
Note: different image sizes are not compulsary android can auto resize your images to different sizes if you don't provide them.

Don't change the design when language of phone changed

hello i'm a new android developer and I create an android app.
when the language of phone is English everything is good but when i change it to a right to left language (for example Persian or Arabic) location of views are changed. what should i do? thanks .
in your AndroidManifest.xml, add the following line to the application node's attributes:
android:supportsRtl="false"
Your final code should look like this
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="false"
android:theme="#style/AppTheme">
...
</application>
</manifest>

how to add logo with app label in android studio

<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:logo="#drawable/logo"
android:theme="#style/AppTheme" >
This is my androidmanifest.xml
and in mainactivity.java i use this lines to show logo in action bar.
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setIcon(R.drawable.logo);
after using this two lines in .java file my logo is showing in the display but the app label is gone....
is their any method by which logo & app label both will shown in actionbar after compiling apk.
You not need the two lines in mainactivity.java, you have to select a Theme with the ActionBar:
From res>layout>activity_main.xml(or whatever is the name of the layout of your activity): in the "Design" tab change the theme in "Holo.Light.DarkActionBar" for example.
Or from the AndroidManifest.xml in your app add (or change):
android:theme="#style/AppTheme"
where "AppTheme" is defined in res>values>styles.xml as:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"></style>
Of course in your manifest you have to define the name and logo in the <application> level:
<application
android:logo="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme"
...
Add this into your Activity in manifest.
<activity
android:name=".MainActivity"
android:label="#string/app_name"
</activity>
copy your image file and paste it to the res->minmap folder and then goto your AndroidManifest file and locate the below option
android:icon="#mipmap/image_file_name"
give your icon image file name name here (image_file_name) then run your app.

Categories

Resources