-1

I am new to android application development. When I create a test app. I see the app name and logo by default. To change that we can go to androidmanifest.XML file and change it.

My question is, I want an image to be fixed in the place of the app name displaying in the top of the app.

Kindly help me.

Steven Doggart
  • 43,358
  • 8
  • 68
  • 105
Rokesh
  • 37
  • 1
  • 9

2 Answers2

1

If you want to get result try this;

In code:

getActionBar().setTitle("");
getActionBar().setIcon(R.drawable.your_icon);

In XML:

<activity android:name=".MyActivity" 
       android:icon="@drawable/your_icon" 
       android:label="" />  

To enable the back button in your app use:

 getActionBar().setHomeButtonEnabled(true);
 getActionBar().setDisplayHomeAsUpEnabled(true);
GIGAMOLE
  • 1,274
  • 1
  • 11
  • 17
0

You can change name of application from values/strings.xml for ex: <string name="app_name">your app name</string> for more: http://developer.android.com/guide/topics/resources/string-resource.html

and you can change image with create new icon_launcher for good ex: Set icon for android application

Community
  • 1
  • 1
Ozan
  • 1,191
  • 2
  • 16
  • 31