2012. 11. 30. 15:11

 

<com.example.android.apis.view.LabelView
            android:background="@drawable/red"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:text="Red"/>
   
    <com.example.android.apis.view.LabelView
            android:background="@drawable/blue"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:text="Blue" app:textSize="20dp"/>
   
    <com.example.android.apis.view.LabelView
            android:background="@drawable/green"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:text="Green" app:textColor="#ffffffff" />

 

values/color.xml

 

<resources>
    <drawable name="red">#7f00</drawable>
    <drawable name="blue">#770000ff</drawable>
    <drawable name="green">#7700ff00</drawable>

 <drawable name="yellow">#77ffff00</drawable>
 
 <drawable name="screen_background_black">#ff000000</drawable>
    <drawable name="translucent_background">#e0000000</drawable>
    <drawable name="transparent_background">#00000000</drawable>

    <color name="solid_red">#f00</color>
    <color name="solid_blue">#0000ff</color>
    <color name="solid_green">#f0f0</color>
    <color name="solid_yellow">#ffffff00</color>

</resources>

Posted by hoonihoon