让EditText无法点击编辑和RatingBar无法点击
16lz
2021-01-23
(1)让EditText无法点击
解决办法:
将EditText中设置三个属性就行了
android:focusable="false"
android:focusableInTouchMode="false"
android:clickable="false"
如下:
<EditText
android:id="@+id/thhxq_eidt_shuoming"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:background="@drawable/shape_rec_little"
android:gravity="left|top"
android:focusable="false"
android:focusableInTouchMode="false"
android:clickable="false"
android:paddingLeft="5dp"
android:paddingTop="5dp" />
(2)让RatingBar无法点击
ratingbar.setEnable(false);
更多相关文章
- android Property Animation 属性动画详解
- 探讨相对布局的重要特性和属性
- Android 的系统属性(SystemProperties)设置分析
- android 组件,xml布局中属性详解
- [置顶] android:configChanges属性