zoukankan      html  css  js  c++  java
  • listView当中有嵌套了有onClickListener的控件时ListView自身的onItemClick无响应的解决方案

    Ref:http://www.cnblogs.com/bluestorm/archive/2013/03/24/2979557.html

    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.

    ConstantValueDescription
    beforeDescendants 0 The ViewGroup will get focus before any of its descendants.
    afterDescendants 1 The ViewGroup will get focus only if none of its descendants want it.
    blocksDescendants 2 The ViewGroup will block its descendants from receiving focus.

    解决方案

    在ListView要显示的Item的外层加上

    android:descendantFocusability="blocksDescendants"

  • 相关阅读:
    1022 D进制的A+B
    1021 个位数统计
    L1-040 最佳情侣身高差
    Celery--基本使用
    Celery--安装
    Celery--简介
    RabbitMQ--常用命令
    RabbitMQ--RPC实现
    RabbitMQ发布订阅
    RabbitMQ基本使用
  • 原文地址:https://www.cnblogs.com/jinglecode/p/5872868.html
Copyright © 2011-2022 走看看