baoyongzhang / baoyongzhang/SwipeMenuListView
item 布局失效!
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
你好,你的控件写的很好!不过这里有个小问题!是否可以修正?
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 布局都是一样的高度。
Contributor guide
No contributing guide indexed for this repository
Research direction
Open SwipeMenuLayout and inspect its init method, starting with the mContentView.setLayoutParams(contentParams) call identified in the issue. Confirm how this affects item layout parameters and verify that item views can retain their configured heights after the change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100