Defining icon attributes


Last Updated:

  1. StevenHu

    StevenHu Well-Known Member This Topic's Starter

    Joined:
    Feb 8, 2011
    Messages:
    91
    Likes Received:
    0
    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

    Joined:
    Dec 16, 2010
    Messages:
    136
    Likes Received:
    21
    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...