Search in sources :

Example 1 with PictureAdapter

use of com.dante.adapter.PictureAdapter in project 91Pop by DanteAndroid.

the class PictureViewerActivity method init.

private void init() {
    // fixSwipeBack();
    imageList = getIntent().getStringArrayListExtra(Keys.KEY_INTENT_PICTURE_VIEWER_IMAGE_ARRAY_LIST);
    int currentPosition = getIntent().getIntExtra(Keys.KEY_INTENT_PICTURE_VIEWER_CURRENT_IMAGE_POSITION, 0);
    updateNumberText(currentPosition);
    if (imageList == null) {
        imageList = new ArrayList<>();
    }
    pictureAdapter = new PictureAdapter(imageList);
    viewPager.setAdapter(pictureAdapter);
    viewPager.setCurrentItem(currentPosition);
    int id = getIntent().getIntExtra(Keys.KEY_INTENT_MEI_ZI_TU_CONTENT_ID, 0);
    if (id > 0) {
        presenter.listMeZiPicture(id, false);
    }
    Mm99 mm99 = (Mm99) getIntent().getSerializableExtra(Keys.KEY_INTENT_99_MM_ITEM);
    if (mm99 != null) {
        presenter.list99MmPicture(mm99.getId(), mm99.getImgUrl(), false);
    }
}
Also used : Mm99(com.dante.data.model.Mm99) PictureAdapter(com.dante.adapter.PictureAdapter) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 PictureAdapter (com.dante.adapter.PictureAdapter)1 Mm99 (com.dante.data.model.Mm99)1