public class PictureSelectorActivity extends PictureBaseActivity implements android.view.View.OnClickListener, PictureAlbumDirectoryAdapter.OnItemClickListener, PictureImageGridAdapter.OnPhotoSelectChangedListener
Modifier and Type | Field and Description |
---|---|
protected PictureImageGridAdapter |
adapter |
protected boolean |
anim |
protected android.view.animation.Animation |
animation |
protected static int |
DISMISS_DIALOG |
protected java.util.List<LocalMediaFolder> |
foldersList |
protected FolderPopWindow |
folderWindow |
protected java.util.List<LocalMedia> |
images |
protected boolean |
isFirstEnterActivity |
protected android.widget.FrameLayout |
mBottomLayout |
protected LocalMediaLoader |
mediaLoader |
protected android.widget.ImageView |
mIvArrow |
protected RecyclerView |
mPictureRecycler |
protected android.widget.FrameLayout |
mTopLayout |
protected android.widget.TextView |
mTvCancel |
protected android.widget.TextView |
mTvEmpty |
protected android.widget.TextView |
mTvPictureOk |
protected android.widget.TextView |
mTvPicturePreview |
protected android.widget.TextView |
mTvPictureTitle |
protected static int |
SHOW_DIALOG |
cameraPath, colorPrimary, colorPrimaryDark, compressDialog, config, container, dialog, numComplete, openWhiteStatusBar, originalPath, selectionMedias
Constructor and Description |
---|
PictureSelectorActivity() |
Modifier and Type | Method and Description |
---|---|
protected void |
changeImageNumber(java.util.List<LocalMedia> selectImages)
change image selector state
|
int |
getResourceId()
获取布局文件
|
void |
initPictureSelectorStyle()
动态设置相册主题
|
protected void |
initWidgets() |
protected void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data) |
void |
onBackPressed() |
void |
onChange(java.util.List<LocalMedia> selectImages)
已选Media回调
|
void |
onClick(android.view.View v) |
protected void |
onCreate(android.os.Bundle savedInstanceState) |
protected void |
onDestroy() |
void |
onItemClick(boolean isCameraFolder,
java.lang.String folderName,
java.util.List<LocalMedia> images) |
void |
onPictureClick(LocalMedia media,
int position)
图片预览回调
|
void |
onRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults) |
protected void |
onRestoreInstanceState(android.os.Bundle savedInstanceState) |
protected void |
onResume() |
protected void |
onSaveInstanceState(android.os.Bundle outState) |
void |
onTakePhoto()
拍照回调
|
protected void |
readLocalMedia()
get LocalMedia s
|
void |
startCamera()
open camera
|
void |
startPreview(java.util.List<LocalMedia> previewImages,
int position)
preview image and video
|
attachBaseContext, closeActivity, createNewFolder, dismissCompressDialog, dismissDialog, getContext, getImageFolder, handleMessage, handlerResult, onResult, removeImage, showCompressDialog, showPleaseDialog, startOpenCamera
protected static final int SHOW_DIALOG
protected static final int DISMISS_DIALOG
protected android.widget.ImageView mIvArrow
protected android.widget.TextView mTvPictureTitle
protected android.widget.TextView mTvCancel
protected android.widget.TextView mTvPictureOk
protected android.widget.TextView mTvEmpty
protected android.widget.TextView mTvPicturePreview
protected RecyclerView mPictureRecycler
protected android.widget.FrameLayout mBottomLayout
protected PictureImageGridAdapter adapter
protected java.util.List<LocalMedia> images
protected java.util.List<LocalMediaFolder> foldersList
protected FolderPopWindow folderWindow
protected android.view.animation.Animation animation
protected boolean anim
protected LocalMediaLoader mediaLoader
protected boolean isFirstEnterActivity
protected android.widget.FrameLayout mTopLayout
protected void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class PictureBaseActivity
protected void onRestoreInstanceState(android.os.Bundle savedInstanceState)
protected void onResume()
public int getResourceId()
PictureBaseActivity
getResourceId
in class PictureBaseActivity
protected void initWidgets()
initWidgets
in class PictureBaseActivity
protected void changeImageNumber(java.util.List<LocalMedia> selectImages)
selectImages
- public void initPictureSelectorStyle()
initPictureSelectorStyle
in class PictureBaseActivity
protected void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState
in class PictureBaseActivity
protected void readLocalMedia()
public void startCamera()
public void onClick(android.view.View v)
onClick
in interface android.view.View.OnClickListener
public void onItemClick(boolean isCameraFolder, java.lang.String folderName, java.util.List<LocalMedia> images)
onItemClick
in interface PictureAlbumDirectoryAdapter.OnItemClickListener
public void onTakePhoto()
PictureImageGridAdapter.OnPhotoSelectChangedListener
onTakePhoto
in interface PictureImageGridAdapter.OnPhotoSelectChangedListener
public void onChange(java.util.List<LocalMedia> selectImages)
PictureImageGridAdapter.OnPhotoSelectChangedListener
onChange
in interface PictureImageGridAdapter.OnPhotoSelectChangedListener
public void onPictureClick(LocalMedia media, int position)
PictureImageGridAdapter.OnPhotoSelectChangedListener
onPictureClick
in interface PictureImageGridAdapter.OnPhotoSelectChangedListener
public void startPreview(java.util.List<LocalMedia> previewImages, int position)
previewImages
- position
- protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data)
public void onBackPressed()
protected void onDestroy()
onDestroy
in class PictureBaseActivity
public void onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults)
onRequestPermissionsResult
in class PictureBaseActivity