android edittxet 设置可点击不可编辑状态
16lz
2021-01-23
xml布局设置:
<EditText android:id="@+id/etInput" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" android:cursorVisible="false" android:focusable="false" android:focusableInTouchMode="false" android:layout_marginLeft="10dp" android:layout_toLeftOf="@+id/tvMore" android:layout_toRightOf="@+id/tvTitle" android:digits="@string/digits_cedit_card" android:inputType="text" tools:text="title" />
代码动态设置:
editText.setCursorVisible(false);editText.setFocusable(false);editText.setFocusableInTouchMode(false);
更多相关文章
- android 相对布局例子代码
- Android:获取网页源代码
- Android软键盘之代码改变软键盘状态
- android 用代码设置margin属性,textView加粗
- Android调用百度地图API实现――实时定位代码
- android获取当前Canvas位图代码
- Android 代码获取手机ip地址(个人笔记)
- Android Studio 添加百分比布局库的依赖报错 第一行代码
- 简单布局收缩动画