Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

查看大图时 开放容器photoview 方便外部设置它的触摸事件 #2320

Open
wants to merge 1 commit into
base: version_component
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/main/java/com/luck/pictureselector/CoilEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class CoilEngine : ImageEngine {
url: String,
maxWidth: Int,
maxHeight: Int,
imageView: ImageView?,
call: OnCallbackListener<Bitmap>?
) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void loadImage(@NonNull Context context, @NonNull String url, @NonNull Im
* @param call 回调接口
*/
@Override
public void loadImageBitmap(@NonNull Context context, @NonNull String url, int maxWidth, int maxHeight, OnCallbackListener<Bitmap> call) {
public void loadImageBitmap(@NonNull Context context, @NonNull String url, int maxWidth, int maxHeight, ImageView imageView,OnCallbackListener<Bitmap> call) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void loadImage(@NonNull Context context, @NonNull String url, @NonNull Im
* @param call 回调接口
*/
@Override
public void loadImageBitmap(@NonNull Context context, @NonNull String url, int maxWidth, int maxHeight, OnCallbackListener<Bitmap> call) {
public void loadImageBitmap(@NonNull Context context, @NonNull String url, int maxWidth, int maxHeight, ImageView imageView, OnCallbackListener<Bitmap> call) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ private void changeMagicalViewParams(int position) {
setMagicalViewParams(size[0], size[1], position);
} else {
PictureSelectionConfig.imageEngine.loadImageBitmap(getActivity(), media.getAvailablePath(),
maxImageSize[0], maxImageSize[1], new OnCallbackListener<Bitmap>() {
maxImageSize[0], maxImageSize[1], null, new OnCallbackListener<Bitmap>() {
@Override
public void onCall(Bitmap bitmap) {
if (ActivityCompatHelper.isDestroy(getActivity())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public boolean onLongClick(View view) {

protected void loadImageBitmap(final LocalMedia media, int maxWidth, int maxHeight) {
if (PictureSelectionConfig.imageEngine != null) {
PictureSelectionConfig.imageEngine.loadImageBitmap(itemView.getContext(), media.getAvailablePath(), maxWidth, maxHeight,
PictureSelectionConfig.imageEngine.loadImageBitmap(itemView.getContext(), media.getAvailablePath(), maxWidth, maxHeight,coverImageView,
new OnCallbackListener<Bitmap>() {
@Override
public void onCall(Bitmap bitmap) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ public interface ImageEngine {
* @param url
* @param maxWidth
* @param maxHeight
* @param imageView
* @param call
*/
void loadImageBitmap(@NonNull Context context, @NonNull String url, int maxWidth, int maxHeight,
void loadImageBitmap(@NonNull Context context, @NonNull String url, int maxWidth, int maxHeight,ImageView imageView,
OnCallbackListener<Bitmap> call);

/**
Expand Down