Solved

Add Icon to Menu For Android App

Posted on 2011-09-10
2
305 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
There is a lot to be said for protecting yourself and your accounts with 2 factor authentication.  I found to my own chagrin, that there is a big downside as well.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

636 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