How to layout irregular shapes in Android layout -
so graphics artist came me cool layout controls on our new app. problem getting these images laid out since views in android rectangular. see image have work with.
any idea how layout these buttons shape around each other if makes sense?
if problem layout, can draw buttons , save png. can layout app relevantlayout . , use "selector" change button image when user press on.
selector example: "drawable/selector1.xml"
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/buttonclicked" /> <!-- focused , pressed--> <item android:state_pressed="true" android:drawable="@drawable/buttonclicked" /> <!-- pressed --> <item android:drawable="@drawable/button" /> <!-- default --> </selector>
use this:
android:background="@drawable/selector1"
Comments
Post a Comment