public class PicturePreviewActivity extends PictureBaseActivity implements android.view.View.OnClickListener, ViewPagerAdapter.OnCallBackActivity
Modifier and Type | Field and Description |
---|---|
protected ViewPagerAdapter |
adapter |
protected android.view.animation.Animation |
animation |
protected android.view.View |
btnCheck |
protected android.widget.TextView |
check |
protected java.util.List<LocalMedia> |
images |
protected int |
index |
protected boolean |
is_bottom_preview |
protected android.widget.CheckBox |
mCbOriginal |
protected android.os.Handler |
mHandler |
protected android.widget.TextView |
mTvPictureOk |
protected android.widget.ImageView |
picture_left_back |
protected int |
position |
protected boolean |
refresh |
protected int |
screenWidth |
protected android.widget.FrameLayout |
selectBarLayout |
protected java.util.List<LocalMedia> |
selectImages |
protected android.widget.FrameLayout |
topLayout |
protected ViewPager2 |
viewPager |
cameraPath, colorPrimary, colorPrimaryDark, compressDialog, config, container, dialog, numComplete, openWhiteStatusBar, originalPath, selectionMedias
Constructor and Description |
---|
PicturePreviewActivity() |
Modifier and Type | Method and Description |
---|---|
int |
getResourceId()
获取布局文件
|
void |
initPictureSelectorStyle()
动态设置相册主题
|
protected void |
initWidgets() |
boolean |
isSelected(LocalMedia image)
当前图片是否选中
|
void |
onActivityBackPressed()
关闭预览Activity
|
void |
onBackPressed() |
protected void |
onCheckedComplete() |
void |
onClick(android.view.View view) |
protected void |
onComplete() |
protected void |
onCreate(android.os.Bundle savedInstanceState) |
protected void |
onDestroy() |
void |
onImageChecked(int position)
判断当前图片是否选中
|
protected void |
onPageSelectedChange(LocalMedia media)
ViewPage滑动数据变化回调
|
void |
onResult(java.util.List<LocalMedia> images)
return image result
|
protected void |
onSelectedChange(boolean isAddRemove,
LocalMedia media)
选中或是移除
|
protected void |
onSelectNumChange(boolean isRefresh)
更新图片选择数量
|
protected void |
updateSelector(boolean isRefresh)
更新图片列表选中效果
|
attachBaseContext, closeActivity, createNewFolder, dismissCompressDialog, dismissDialog, getContext, getImageFolder, handleMessage, handlerResult, onRequestPermissionsResult, onSaveInstanceState, removeImage, showCompressDialog, showPleaseDialog, startOpenCamera
protected android.widget.ImageView picture_left_back
protected android.widget.TextView mTvPictureOk
protected ViewPager2 viewPager
protected int position
protected boolean is_bottom_preview
protected java.util.List<LocalMedia> images
protected java.util.List<LocalMedia> selectImages
protected android.widget.TextView check
protected ViewPagerAdapter adapter
protected android.view.animation.Animation animation
protected android.view.View btnCheck
protected boolean refresh
protected int index
protected int screenWidth
protected android.os.Handler mHandler
protected android.widget.FrameLayout selectBarLayout
protected android.widget.FrameLayout topLayout
protected android.widget.CheckBox mCbOriginal
public int getResourceId()
PictureBaseActivity
getResourceId
in class PictureBaseActivity
protected void initWidgets()
initWidgets
in class PictureBaseActivity
public void initPictureSelectorStyle()
initPictureSelectorStyle
in class PictureBaseActivity
protected void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class PictureBaseActivity
public void onResult(java.util.List<LocalMedia> images)
PictureBaseActivity
onResult
in class PictureBaseActivity
protected void onDestroy()
onDestroy
in class PictureBaseActivity
public void onImageChecked(int position)
position
- protected void onSelectNumChange(boolean isRefresh)
public boolean isSelected(LocalMedia image)
image
- protected void updateSelector(boolean isRefresh)
isRefresh
- protected void onPageSelectedChange(LocalMedia media)
media
- public void onClick(android.view.View view)
onClick
in interface android.view.View.OnClickListener
public void onBackPressed()
protected void onComplete()
protected void onCheckedComplete()
protected void onSelectedChange(boolean isAddRemove, LocalMedia media)
isAddRemove
- media
- public void onActivityBackPressed()
ViewPagerAdapter.OnCallBackActivity
onActivityBackPressed
in interface ViewPagerAdapter.OnCallBackActivity