在XML布局上的长按定义,如android:onClick
发布时间:2020-12-16 07:52:09 所属栏目:百科 来源:网络整理
导读:有什么办法定义为 XML布局longKeyLongPress定义像onClick吗? 这就是我的看法 TextViewxmlns:android="http://schemas.android.com/apk/res/android"android:text="Line 1"android:layout_width="wrap_content"android:layout_height="wrap_content"android:
有什么办法定义为
XML布局longKeyLongPress定义像onClick吗?
这就是我的看法 <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:text="Line 1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/message" android:textSize="15dip" android:textStyle="bold" android:textColor="@color/colorblue" android:shadowDy="1.0" android:shadowDx="1.0" android:shadowRadius="1.0" android:shadowColor="#ffffffff" android:paddingLeft="10dip" android:paddingRight="10dip" android:paddingTop="5dip" android:lineSpacingExtra="3dip" android:lineSpacingMultiplier="1.1" android:singleLine="false" android:autoLink="web|email|phone|map|all" android:onClick="clickHandler" android:clickable="true" /> 我想要像以前一样的事情,但反应长时间的事件. 注意: >我不想从我的代码添加监听器.
看目前的文档,这样一个XML参数当前不存在. longClickable是一个布尔参数,用于定义View是否响应长时间的点击.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- c# – Automapper Custom Resolver – 将Repository注入构造
- c – 为什么(0> v.size() – 1)对空向量求值为false?
- c# – 使用partial从自动生成的linq-sql对象中抽象方法
- Ruby – 在一行上使用多个条件
- logback logback.xml常用配置详解(二)<appender>
- Oracle 12c多租户特性详解:PDB 的备份与恢复
- Regularization 正则化 解决过拟合问题 Lecture 7
- 在Swift 2.2中替换_stdlib_getDemangledTypeName()
- QT 4.7支持中文(QT4.7)(中文)(makeqpf)
- react-native运行样例报错:Error watching file for chang