Android: App name shows the first page name, not the app name -


I changed the initial page in my app for "login" activity but now I get the name of the app in my mobile "Login"

I've checked "string / app_de", it still has the app's name "login" in its mobile

Change the app's name to "MyApp" "Login Without changing the title of the activity?

Here's my AndroidManifest.xml

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Manifest xmlns: Andrew D = "http://schemas.android.com/apk/res/android" package = "com.asmgx.myapp.app"> & lt; use-permission android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_FINE_LOCATION" /> Android: Android: Android: Android: Android: Android: label = "@ string / app_name" Android: Android: Android : Allow = @ style / Aaptim "Android: debuggable =" false "& gt; & Lt; Activity Android: name = "com.asmgx.myapp.app.MainActivity" android: label = "@ string / app_name" & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.asmgx.myapp.app.add_msg" android: label = "@ string / title_activity_add_msg" & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.asmgx.myapp.app.ItemDetail" Android: label = "@ string / title_activity_item_detail" & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.asmgx.myapp.app.ListFilter" Android: label = "@ string / title_activity_list_filter" & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.asmgx.myapp.app.login" android: label = "@ string / title_activity_login" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.asmgx.myapp.app.test1" android: label = "@ string / title_activity_test1" & gt; & Lt; / Activity & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;  

If your launcher is not labeled in activity its < Code> Intent-filter attribute, its label value will be derived from the original component (either from activity or application ).

All you have to do is add a label to your intent-filter, such as:

  & lt; Activity Android: name = "com.asmgx.myapp.app .login" android: label = "@ string / title_activity_login" & gt; & Lt; Intro-filter Android: label = "@ string / app_name" & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt;  

This will apply your app name to @ string / app_name and give activity title to @ string / title_activity_login Value

See the approved answer for more information.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -