<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/discount_back" > <TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/discount_back"/>
</LinearLayout>discount_back.xml<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/jt_1" />
<item android:state_selected="true" android:drawable="@drawable/jt_1" />
<item android:state_pressed="true" android:drawable="@drawable/jt_1" />
<item android:drawable="@drawable/jt" />
</selector>
按钮的按下效果起作用,但LinearLayout中按下效果就没用,不知道为什么,求解,thanks
android:clickable="true"
android:focusable="true"