小编Aks*_*bra的帖子

Android NestedScrollView的子视图忽略了第一次点击

我在我的片段中使用Coordinator布局以及NestedScrollView来折叠工具栏动画。我正在将视图动态添加到嵌套的Scrollview容器中。我已经在NestedScrollView内的视图上实现了onClickListener,但是对任何视图的第一次单击始终会被忽略。当我第二次点击或超过其正常工作时。我的XML的代码如下:

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~      http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR …
Run Code Online (Sandbox Code Playgroud)

android android-support-library android-support-design nestedscrollview

5
推荐指数
1
解决办法
1848
查看次数