• ScrollView 嵌套 ListView 时,刷新页面时,会出现 自动 滚动至listview 的区域 解决方案:


    在页面切换  的时候,可能会出现  因listview 数据加载  导致  该页面展示的位置为 该listview区域

    解决方案:可在ScrollView中添加  

    android:descendantFocusability="blocksDescendants"

    概述:

    android:descendantFocusability
    
    Defines the relationship between the ViewGroup and its descendants when looking for a View to take focus.
    
    Must be one of the following constant values.

    该属性是当一个为view获取焦点时,定义viewGroup和其子控件两者之间的关系。

    该属性的值有三种:

          

      beforeDescendants:viewgroup会优先其子类控件而获取到焦点
    
            afterDescendants:viewgroup只有当其子类控件不需要获取焦点时才获取焦点
    
            blocksDescendants:viewgroup会覆盖子类控件而直接获得焦点

      beforeDescendants:viewgroup会优先其子类控件而获取到焦点
    
            afterDescendants:viewgroup只有当其子类控件不需要获取焦点时才获取焦点
    
            blocksDescendants:viewgroup会覆盖子类控件而直接获得焦点
  • 相关阅读:
    csp-2020-s游记
    线性DP
    tarjan无向图
    tarjan有向图
    树前置知识普及
    hash
    可持久化线段树&主席树
    [HAOI 2015] 树上染色
    [Contest on 2020.11.24] Beetle
    [Contest on 2020.11.24] Candy
  • 原文地址:https://www.cnblogs.com/jinglecode/p/7656387.html
Copyright © 2020-2023  润新知