|
|
@@ -1,12 +1,14 @@
|
|
|
package com.xzjmyk.pm.activity.ui.tool;
|
|
|
|
|
|
import android.content.Intent;
|
|
|
+import android.content.pm.ActivityInfo;
|
|
|
import android.graphics.Bitmap;
|
|
|
import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.v4.view.PagerAdapter;
|
|
|
import android.support.v4.view.ViewPager;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.util.Log;
|
|
|
import android.util.SparseArray;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
@@ -50,6 +52,7 @@ public class MultiImagePreviewActivity extends ActionBackActivity {
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);//竖屏
|
|
|
if (getIntent() != null) {
|
|
|
mImages = (ArrayList<String>) getIntent().getSerializableExtra(AppConstant.EXTRA_IMAGES);
|
|
|
mPosition = getIntent().getIntExtra(AppConstant.EXTRA_POSITION, 0);
|
|
|
@@ -206,7 +209,7 @@ public class MultiImagePreviewActivity extends ActionBackActivity {
|
|
|
switch (scheme) {
|
|
|
case HTTP:
|
|
|
case HTTPS:// 需要网络加载的
|
|
|
- ImageLoader.getInstance().displayImage(imageUrl, (ImageView) view);
|
|
|
+ ImageLoader.getInstance().displayImage(imageUrl, (ImageView) view, mImageLoadingListener);
|
|
|
break;
|
|
|
case UNKNOWN:// 如果不知道什么类型,且不为空,就当做是一个本地文件的路径来加载
|
|
|
if (!TextUtils.isEmpty(imageUrl)) {
|
|
|
@@ -249,6 +252,9 @@ public class MultiImagePreviewActivity extends ActionBackActivity {
|
|
|
@Override
|
|
|
public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {
|
|
|
mAttacher=new PhotoViewAttacher((ImageView) arg1);
|
|
|
+ Log.i("Arison", "" + mAttacher.getMidScale());
|
|
|
+ Log.i("Arison", "" + mAttacher.getMinimumScale());
|
|
|
+ mAttacher.setMinimumScale(0.5f);
|
|
|
mAttacher.update();
|
|
|
|
|
|
mAttacher.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
|