Last active
September 17, 2015 17:51
-
-
Save kodamirmo/893ad8b959df2aab88d2 to your computer and use it in GitHub Desktop.
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
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="" | |
android:background="@drawable/fondo_boton"/> | |
<!-- fondo_boton, es el nombre del archivo XML donde pusiste las imagenes --> |
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
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<!-- La imagen "button_imagen1" es la que muestra cuando tiene el foco --> | |
<item android:drawable="@drawable/button_imagen1" android:state_selected="true" /> | |
<!-- La imagen "button_imagen2" es la que muestra cuando se presiona --> | |
<item android:drawable="@drawable/button_imagen2" android:state_pressed="true" /> | |
<!-- La imagen "button_imagen3" es la que muestra en el estado normal --> | |
<item android:drawable="@drawable/button_imagen3" /> | |
</selector> | |
<!-- Este archivo lo tienes que guardar en la carpeta "drawable" --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment