Different image for focused,pressed and normal state in android button
In this tutorial we are going to learn about the android button and every state (pressed,focused and normal) of an image when placed on that button. 1) First create a new project in android studio more details... 2) Remove the TextView code from activity_main.xml , create a button in your project by using the following code or tools. < Button android : layout_height = " wrap_content " android : layout_width = " wrap_content " android : background = " @drawable/btnhome_new " /> Note: In the above image you can see an error @drawable/btnhome_new . This is because the program contains the file btnhome_new.xml on drawable directory, which is not yet created. 3) Now we are going to create a file btnhome_new.xml on drawable directory. a) Right click on the drawable directory => New => Drawable resource file b) Now a file is opened btnhome_new.xml just remo...