use of com.lzy.imagepicker.view.FolderPopUpWindow in project ImagePicker by jeasonlzy.
the class ImageGridActivity method createPopupFolderList.
/** 创建弹出的ListView */
private void createPopupFolderList() {
mFolderPopupWindow = new FolderPopUpWindow(this, mImageFolderAdapter);
mFolderPopupWindow.setOnItemClickListener(new FolderPopUpWindow.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
mImageFolderAdapter.setSelectIndex(position);
imagePicker.setCurrentImageFolderPosition(position);
mFolderPopupWindow.dismiss();
ImageFolder imageFolder = (ImageFolder) adapterView.getAdapter().getItem(position);
if (null != imageFolder) {
mImageGridAdapter.refreshData(imageFolder.images);
mBtnDir.setText(imageFolder.name);
}
//滑动到顶部
mGridView.smoothScrollToPosition(0);
}
});
mFolderPopupWindow.setMargin(mFooterBar.getHeight());
}
Aggregations