Android app name not being displayed

前端 未结 13 2313
梦谈多话
梦谈多话 2020-12-29 20:53

My Android app is not displaying the application name \"app_name\", instead its displaying the activity name \"title\". This is from my manifest file;

   <         


        
13条回答
  •  心在旅途
    2020-12-29 21:41

    If you or somebody is still facing the problem then here is the solution which worked for me.

    Keep the Application label and Main activity label same in manifest as shown below

    
    
        
            
            
        
    
    

    in main.java file set the label of your activity as shown below (I guess you are using action bar)

    ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle(getResources().getString(R.string.title));
    

    before installing this changed app, uninstall the previous version reboot your phone and now install the changed app.

    I hope this helps.

提交回复
热议问题