SwipeMenuListView
SwipeMenuListView copied to clipboard
item 布局失效!
你好,你的控件写的很好!不过这里有个小问题!是否可以修正?
SwipeMenuLayout 文件 init 方法
if (mOpenInterpolator != null) {
mOpenScroller = ScrollerCompat.create(getContext(),
mOpenInterpolator);
} else {
mOpenScroller = ScrollerCompat.create(getContext());
}
LayoutParams contentParams = new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
mContentView.setLayoutParams(contentParams);
if (mContentView.getId() < 1) {
mContentView.setId(CONTENT_VIEW_ID);
}
mContentView.setLayoutParams(contentParams); 重置了布局参数,把布局中配置 LayoutParams 忽略了! 这样导致的结果是,无论怎么控制item 布局都是一样的高度。
android:minHeight="90dp" in your layout. It works fine for me.