Are there any special guidelines to put launcher icon in Android 7.1.1 ?
Because I added a logo in manifest file and its showing in all Android versions but not in my phone. Anyone got a clue?
In Manifest.xml, please check have to set icons for both android:icon="#mipmap/ic_app_icon" and android:roundIcon="#mipmap/ic_app_icon":
Here is the full code :
<application
android:allowBackup="true"
android:icon="#mipmap/ic_app_icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_app_icon"
android:supportsRtl="true"
android:theme="#style/AppTheme">
Related
I have this issue in my App, which is super weird.
I have an app, when i press Run on Android Studio, it starts the app with the correct layout's direction. Now, i press Back button and go back to the app, it shows a RTL layout instead of the current, correct LTR layout.
The app is pretty simple, it has an Activity with a NavigationButton in the Toolbar, when its flipped, the NavigationButton goes from left to the right, with a false pointing direction.
The app is LTR, supports only English, and tested on an English device, the same result is happening on the Emulator. I have the final version of Android Studio.
Layout, with Toolbar, along with navigation attribute, to enable back arrow.
Activity which setContentView and just shows the layout.
Back pressing, or re-opening the App without clearing it from the BackStack, shows the visual bug.
What cause the issue? as the code is pretty simple and doesn't have anything hardcore.
Manifest Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.corF.app">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:supportsRtl="true"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">
<activity
android:name="com.corF.app.activities.ActivityStartup"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
A library which i use (SliderLayout), has a code which forces the app to show RTL. On the first launch the SliderLayout forces the RTL, but it doesn't take change until i re-open the app without fully removing it from the backstack.
Silly issue, but yeah, this's the solution.
I've made a few Android App with the launcher icon in drawable. Now, with the new Android Studio, it seems better to put it (or them) inside mipmap. So I've done that and get a problem:
The icon of the new App is visible on the desktop with the correct name, but in the Settings/Application List, the App has the default Android icon and the name is the dev path (eg com.ansb.reflexe rather than "Reflexo")
My Manifest is the same than for the older App so seems not to be the "reason why"
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
Any idea?
I am trying to change the launch icon of my already developed android app. I right click on res folder. Go to new --> image asset and change the path given there.
It confirms me that some files will be updated and so on. But my launch icon doesnt change.
On top of that , when I go back to res --> new --> image asset, path has changed itself back to original path:
C:\Program Files\Android\Android Studio1\plugins\android\lib\templates\gradle-projects\NewAndroidModule\root\res\mipmap-xhdpi\ic_launcher.png
The above path is not even a part of my project. I am unable to fiure out , where this is hard coded. Please help.
you can change change an icon, just long press on an app, and this pop-up menu shows up. Tap on Edit. Next, tap on the original icon seen on the left. You can choose a new icon from a pack, or you can create one from the images in your gallery.
You can change icon by installing a custom launcher,
Go to your apps AndroidManifest.xml file and change android:icon attribute with your icon
<application
android:allowBackup="true"
android:icon="#drawable/your_icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
On Android Studio, a right click on the root folder of your app > New > Image Asset > Launcher Icons and setting your new icon should do the trick and overwrite the existing one.
If it doesn't, try removing the asset in your project tree first, and try again. You have to delete every resolution of it!
I've made it like this in my app:
delete every single file in your project called ic_launcher.png
(mostly found in android studio under project->src->res->drawable/mipmap...)
rename your own Icon png to: ic_launcher.png
drag and drop your icon into the folder 'mipmap' or 'drawable', depending where the file previously was, in your android studio project.
done :)
You should add the new icon in all mipmap folders like xxxhdpi,xxhdpi,xhdpi
Firstly add all the application Icon size in mipmap like mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi.After then just place name in android:icon attribute.
<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">
</application>
I'm using eclipse and I'm trying to figure out how to only allow a Portrait state be used during game play. I can't seem to find any options in eclipse to block the Landscape state.
I'd appreciate any assistance. I know it's probably a simple matter, but I can't seem to find it and I've not tried to do this before.
Thanks in advance.
In your AndroidManifest file you can achieve this. You will add the android:screenOrientation tag in your application declaration. Something like this
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:screenOrientation="portrait" > //HERE
<activity
android:name="com.test.SomeActivity"
android:label="#string/app_name" >
You can change that to landscape as well. This attribute can also be applied to individual activities instead of the whole application if you need that.
In the activity tags of your manifest file, add this:
android:screenOrientation="portrait"
As by default, the application name is appearing on one label like TextView. How do i remove my titlebar permanently for my application?
Any ideas?
You can use below code for that -
<activity android:name="YourActivityname" android:theme="#android:style/Theme.NoTitleBar" />
If you want the full screen of your device you can use below code -
<activity android:name="YourActivityname" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
And, also refer Developer's Site
That is a setting based on the activity in your android manifest file.
Use the No Title Bar theme for your activity.
<activity android:name="MyActivityName" android:theme="#android:style/Theme.NoTitleBar" />