Solved

Add Icon to Menu For Android App

Posted on 2011-09-10
2
300 Views
Last Modified: 2012-05-12
I am just starting to learn how to make an android app..I followed the guide lines to make the hellp world applcation and it works. I was wondering how do I add an icon to the script to display on the meu when I transfer it to my phone..THanks
package com.example.hellodroid;

import android.app.Activity;

import android.os.Bundle;
import android.widget.TextView;

public class HelloDroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv = new TextView(this);
        tv.setText("Hello, Android");
        setContentView(tv);
    }
}

Open in new window

0
Comment
Question by:brad0525
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
ID: 36521593
the icon will be added automatically to the list of all applications when your app is installed.

in your AndroidManifest.xml, you'll see something like

<application android:icon="@drawable/icon48x48"

Open in new window


which tell Android what Icon to use for that.
0
 

Author Closing Comment

by:brad0525
ID: 36979082
thanks, that worked
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question