import android.content.Context;import android.util.AttributeSet;import android.widget.ExpandableListView;/** * 处理scrollciew里嵌套ExpandableListView的滑动事件 * */public class CustomerExpandableListView extends ExpandableListView {public CustomerExpandableListView(Context context) {super(context);// TODO Auto-generated constructor stub}public CustomerExpandableListView(Context context, AttributeSet attrs) {super(context, attrs);}public CustomerExpandableListView(Context context, AttributeSet attrs,int defStyle) {super(context, attrs, defStyle);}/** * 只需要重写这个方法即可 */@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,MeasureSpec.AT_MOST);super.onMeasure(widthMeasureSpec, expandSpec);}}

更多相关文章

  1. 解决ScrollView中嵌套RecyclerVIew产生滑动冲突问题
  2. Android ScrollView + ListView嵌套使用
  3. 在屏幕上方是actionBar tab的ViewPager页面里面嵌套子tab并显示
  4. android:解决 ScrollView嵌套RecyclerView后无法惯性滑动的问题
  5. Android简单的Fragment嵌套Fragment(Viewpager+Fragement)
  6. Android ViewPager 中嵌套webview 的滚动处理
  7. Android中的HashMap原理实践探索,重写equals(),为什么重写hashCode
  8. android嵌套滑动- Material Design
  9. Android百分比布局(PercentRelativeLayout)嵌套NavigationView自

随机推荐

  1. 什么是Android(安卓)- 开放手机联盟和And
  2. android中的数据库操作
  3. Android实现滑动的7种方法
  4. Android如何检测网络的类型为3G、2G、wap
  5. Android视频采集
  6. Android应用程序的生命周期
  7. AsyncTask总结
  8. Android(安卓)View(一)-View坐标以及方法
  9. android输入法02:openwnn源码解析01—输入
  10. Android中实现跨进程通信(IPC)的几种方式