您的位置:首页 > 其它

LinearLayout按下(pressed)或获取焦点(focused)时背景设置不同颜色或图片

2013-12-05 09:56 141 查看
<LinearLayout   
    xmlns:android="http://schemas.android.com/apk/res/android"  
    android:id="@+id/myview"  
    android:orientation="horizontal"  
    android:layout_width="fill_parent"  
    android:layout_height="wrap_content"  
    android:gravity="top"  
    android:background="@drawable/myDrawable"  
    android:clickable="true" >  
</LinearLayout>


加上 Clickable就可以了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: