Android开发,加载更多数据后点击item后下标越界怎么回事?
@OverridepublicvoidonItemChildClick(BaseQuickAdapteradapter,Viewview,intposition){if(...
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
if (view.getId() == R.id.play_icon) {//播放图标
HomeListBean homeListBean = mDatas.get(position);
List<HomeListBean.DataBean> data = homeListBean.getData();
Toast.makeText(mContext, "119= "+data.size(), Toast.LENGTH_SHORT).show();
// if(data.size()!=0&&data!=null){}
HomeListBean.DataBean dataBean = data.get(position);//这里越界
String titleName = dataBean.getName();
String subName = dataBean.getSubname();
String coverImg = dataBean.getImg();
int vid = dataBean.getVid(); 展开
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
if (view.getId() == R.id.play_icon) {//播放图标
HomeListBean homeListBean = mDatas.get(position);
List<HomeListBean.DataBean> data = homeListBean.getData();
Toast.makeText(mContext, "119= "+data.size(), Toast.LENGTH_SHORT).show();
// if(data.size()!=0&&data!=null){}
HomeListBean.DataBean dataBean = data.get(position);//这里越界
String titleName = dataBean.getName();
String subName = dataBean.getSubname();
String coverImg = dataBean.getImg();
int vid = dataBean.getVid(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询