Solved

Add Icon to Menu For Android App

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Introduction Everyone is using a smartphone these days. Contacts, messages, applications, documents, bookmarks, pictures, videos and other stuff which you created and are present only on your device come under the umbrella called “Personal Data”.…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now