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
Solved

Add Icon to Menu For Android App

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jailbroken TV devices that provide free Netflix service 4 63
see android hidden files 10 98
Java class and jar 3 22
learn programming 8 40
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
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 video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

856 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