Search in sources :

Example 1 with FolderListAdapter

use of cn.finalteam.galleryfinal.adapter.FolderListAdapter in project GalleryFinal by pengjianbo.

the class PhotoSelectActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (GalleryFinal.getFunctionConfig() == null || GalleryFinal.getGalleryTheme() == null) {
        resultFailureDelayed(getString(R.string.please_reopen_gf), true);
    } else {
        setContentView(R.layout.gf_activity_photo_select);
        mPhotoTargetFolder = null;
        findViews();
        setListener();
        mAllPhotoFolderList = new ArrayList<>();
        mFolderListAdapter = new FolderListAdapter(this, mAllPhotoFolderList, GalleryFinal.getFunctionConfig());
        mLvFolderList.setAdapter(mFolderListAdapter);
        mCurPhotoList = new ArrayList<>();
        mPhotoListAdapter = new PhotoListAdapter(this, mCurPhotoList, mSelectPhotoList, mScreenWidth);
        mGvPhotoList.setAdapter(mPhotoListAdapter);
        if (GalleryFinal.getFunctionConfig().isMutiSelect()) {
            mTvChooseCount.setVisibility(View.VISIBLE);
            mFabOk.setVisibility(View.VISIBLE);
        }
        setTheme();
        mGvPhotoList.setEmptyView(mTvEmptyView);
        if (GalleryFinal.getFunctionConfig().isCamera()) {
            mIvTakePhoto.setVisibility(View.VISIBLE);
        } else {
            mIvTakePhoto.setVisibility(View.GONE);
        }
        refreshSelectCount();
        requestGalleryPermission();
        mGvPhotoList.setOnScrollListener(GalleryFinal.getCoreConfig().getPauseOnScrollListener());
    }
    Global.mPhotoSelectActivity = this;
}
Also used : FolderListAdapter(cn.finalteam.galleryfinal.adapter.FolderListAdapter) PhotoListAdapter(cn.finalteam.galleryfinal.adapter.PhotoListAdapter)

Aggregations

FolderListAdapter (cn.finalteam.galleryfinal.adapter.FolderListAdapter)1 PhotoListAdapter (cn.finalteam.galleryfinal.adapter.PhotoListAdapter)1