2013年10月8日星期二

Android Button controls with selector how the background color, add background images

attention is not Android Button controls with selector how the background color, note that not add a background image
------ Solution ------------------------- -------------------
the @ drawable / xxx into color values ​​no good ~
------ Solution ------ --------------------------------------
amount . . Tried it . . Does not compile - but I think we can cut a small piece of color pictures to use when color . .
------ Solution ---------------------------------------- ----

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true"
          android:drawable="@android:color/white"/> <!-- pressed -->
    <item android:drawable="@android:color/black"/> <!-- default -->
</selector>

------ eference ------------------------------ ---------


Will the next if the custom "# aabbcc" how to set it ?
------ eference --------------------------------------- < br>


imageButton on so used
------ eference -------------------------------- -------
5 Building methods fly !

没有评论:

发表评论