Search in sources :

Example 1 with SimpleFragmentAdapter

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);
        }
    }
}
Also used : SimpleFragmentAdapter(com.luck.picture.lib.weiui.library.adapter.SimpleFragmentAdapter) LocalMedia(com.luck.picture.lib.weiui.library.entity.LocalMedia)

Aggregations

SimpleFragmentAdapter (com.luck.picture.lib.weiui.library.adapter.SimpleFragmentAdapter)1 LocalMedia (com.luck.picture.lib.weiui.library.entity.LocalMedia)1