工具箱(为对接数据接口),解决footeritem高度不一问题和开服表闪退问题

This commit is contained in:
kehaoyuan
2017-05-25 09:54:21 +08:00
parent 6347260522
commit f219b62fcc
24 changed files with 472 additions and 29 deletions

View File

@ -136,8 +136,11 @@ public class KaiFuActivity extends BaseActivity implements KaiFuDialogAdapter.On
smoothMove = false;
int n = mMovePosition - layoutManager.findFirstVisibleItemPosition();
if (0 <= n && n < mRecyclerView.getChildCount()) {
int top = layoutManager.findViewByPosition(n).getTop();
mRecyclerView.smoothScrollBy(0, top);
View view = layoutManager.findViewByPosition(n);
if (view!= null) {
int top = view.getTop();
mRecyclerView.smoothScrollBy(0, top);
}
}
}