Thursday, April 12, 2012

How to make a design like this?

I am new to android development and i want to design the application like the following please any one help with sample code


enter image description here



Answer:



Basically what you have is a layout of image buttons. When a button is clicked, the handler starts another activity. The only way back to the home activity is via the Home button that appears in all of the secondary activities.
All the layout of views is done in resources files in folder res/layouts. I am assuming you are familiar with basic layouts, defining views within them, and connecting them to an activity so I will not cover those things here.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true"
         android:state_pressed="true"
         android:drawable="@drawable/title_about_alt"/>
    <item android:state_focused="false"
         android:state_pressed="true"
         android:drawable="@drawable/title_about_alt"/>
    <item android:state_focused="true"
         android:drawable="@drawable/title_about_alt"/>
    <item android:state_focused="false"
         android:state_pressed="false"
         android:drawable="@drawable/title_about_default"/>
</selector>
For more information...

No comments:

Post a Comment