Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Add Icon to Menu For Android App

Posted on 2011-09-10
2
Medium Priority
?
310 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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.
Suggested Courses

704 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