use of com.luck.picture.lib.weiui.library.adapter.SimpleFragmentAdapter in project weiui by kuaifan.
the class PicturePreviewActivity method initViewPageAdapterData.
/**
* 初始化ViewPage数据
*/
private void initViewPageAdapterData() {
tv_title.setText(position + 1 + "/" + images.size());
adapter = new SimpleFragmentAdapter(images, this, this);
viewPager.setAdapter(adapter);
viewPager.setCurrentItem(position);
onSelectNumChange(false);
onImageChecked(position);
if (images.size() > 0) {
LocalMedia media = images.get(position);
index = media.getPosition();
if (config.checkNumMode) {
tv_img_num.setSelected(true);
check.setText(media.getNum() + "");
notifyCheckChanged(media);
}
}
}
Aggregations