You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
调用 notifyDataSetChanged 布局会自动关闭,翻了好久没找到解决办法,后来我重写了OnLayout方法,临时解决一下 @OverRide
protected void onLayout(boolean changed, int l, int t, int r, int b) {
if (isDisableLayout){
int left = listView.getLeft();
int right = listView.getRight();
int top = listView.getTop();
int bottom = listView.getBottom();
Date dt = new Date();
int sec = dt.getSeconds();
listView.layout(0,0,right,bottom+sec);
调用 notifyDataSetChanged 布局会自动关闭,翻了好久没找到解决办法,后来我重写了OnLayout方法,临时解决一下
@OverRide
protected void onLayout(boolean changed, int l, int t, int r, int b) {
if (isDisableLayout){
使用notifyDataSetChanged之后,在调用listView的layout方法,不知道为什么要加个随机数,否则两次调用layout参数都一致的话也不会更新
listView.layout(0,0,1000+ RandomUtils.getRandom(1,100),2000);
The text was updated successfully, but these errors were encountered: