singwhatiwanna / pinnedheaderexpandablelistview Goto Github PK
View Code? Open in Web Editor NEWPinnedHeaderExpandableListView
License: Other
PinnedHeaderExpandableListView
License: Other
getGroupView方法中
groupHolder.follow_icon_help.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Log.e("error", groupPosition + "$$$$$$$$$$$$");
}
});
在固定的group条目中不执行
@OverRide
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (mHeaderView != null && scrollState == SCROLL_STATE_IDLE) {
int firstVisiblePos = getFirstVisiblePosition();
if (firstVisiblePos == 0) {
mHeaderView.layout(0, 0, mHeaderWidth, mHeaderHeight);
}
}
//此处会出现栈溢出,这样写有何用处?注释掉可以正常运行。是否为bug?
if (mScrollListener != null) {
mScrollListener.onScrollStateChanged(view, scrollState);
}
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
if (totalItemCount > 0) {
refreshHeader();
}
//此处会出现栈溢出,这样写有何用处?注释掉可以正常运行。是否为bug?
if (mScrollListener != null) {
mScrollListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount);
}
}
textview是Wrap_Content的,如果不同条目字数不同,只会显示第一次出现的textview的宽度,之后无论字数怎么变,只显示固定数目
我在onLayout方法里把child.measure()这个方法给注释掉后,也能正常运行。
那个delta 变量总是为0。这段代码好像没有用啊
@OverRide
public void updatePinnedHeader(View headerView, int firstVisibleGroupPos) {
Group firstVisibleGroup = (Group) adapter.getGroup(firstVisibleGroupPos);
TextView textView = (TextView) headerView.findViewById(R.id.group);
ImageView image = (ImageView) headerView.findViewById(R.id.image);
textView.setText(firstVisibleGroup.getTitle());
}
悬浮Group头部这里无法改变image状态
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.