1. Download our Official Android App: Forums for Android!

Apps Defining icon attributes

Discussion in 'Android Development' started by StevenHu, Mar 3, 2011.

  1. StevenHu

    StevenHu Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    91
    Joined:
    Feb 8, 2011

    Feb 8, 2011
    91
    0
    15
    Male
    Webmaster
    Orange County
    I read: "To specify an icon and label, you define the attributes android:icon and android:label in the <application> element of the manifest." Not sure exactly how to implement this.

    This is what I have now:

    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".App"
    android:label="@string/app_name">

    I have icons in:

    assets/hdpi/ic_launcer_name_72.png
    assets/ldpi/ic_launcer_name_36.png
    assets/mdpi/ic_launcer_name_48.png

    So how do I "define the attributes"?
     

    Advertisement

  2. JamTheMan

    JamTheMan Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    136
    Joined:
    Dec 16, 2010

    To use the same Icons, just with different DPI's place them in the corresponding folders under res/drawable using the same name for each file - say we call it "ic_launcher_icon".

    Then you change the android:icon="" to this: android:icon="@drawable/ic_launcher_icon"
     
    StevenHu likes this.

Share This Page

Loading...