Created
January 13, 2015 22:08
-
-
Save thedoapps/551dac01900ad0f76343 to your computer and use it in GitHub Desktop.
Como customizar un boton en android, usando selector xml.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<!-- Estado Presionado --> | |
<item android:state_pressed="true"> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<corners android:radius="10dp" /> | |
<solid android:color="@color/red_oficial" /> | |
</shape> | |
</item> | |
<item android:bottom="5dp"> | |
<shape android:shape="rectangle"> | |
<corners android:radius="10dp" /> | |
<solid android:color="@color/red_oficial" /> | |
</shape> | |
</item> | |
</layer-list> | |
</item> | |
<!-- Estado Normal --> | |
<item> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<corners android:radius="10dp" /> | |
<solid android:color="@color/red_oficial" /> | |
</shape> | |
</item> | |
<item android:bottom="3dp"> | |
<shape android:shape="rectangle"> | |
<corners android:radius="10dp" /> | |
<solid android:color="@color/red_normal" /> | |
</shape> | |
</item> | |
</layer-list> | |
</item> | |
</selector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment