<OnClick>
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
指定用户点按视图时要执行的操作。单个 <Transition>
可以有多个 <OnClick>
节点,其中每个 <OnClick>
可指定一个不同的目标视图以及点按该视图时要执行的不同操作。
语法
<OnClick
motion:targetId="@id/target_view"
motion:clickAction="action"/>
属性
motion:targetId
- 受监控的视图。当用户点按此视图时,便会发生过渡。
motion:ClickAction
- 点按视图时要执行的操作。支持的值如下:
transitionToStart
- 为从当前布局到
<Transition>
元素的 motion::constraintSetStart
属性指定的布局添加动画效果。
transitionToEnd
- 为从当前布局到
<Transition>
元素的 motion:constraintSetEnd
属性指定的布局添加动画效果。
jumpToStart
- 从当前布局跳转到
<Transition>
元素的 motion::constraintSetStart
属性指定的布局。
jumpToEnd
- 从当前布局跳转到
<Transition>
元素的 motion:constraintSetEnd
属性指定的布局。
toggle
- 如果布局处于起始状态,则添加动画效果以切换到结束状态。否则,请使用动画切换到开头。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-01-10。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]