Commit 1f14b5fa authored by feihuaduo's avatar feihuaduo

更新gradle版本为4.1.1

详细卡图二指放大缩小
parent a2ce02ca
......@@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:4.1.1'
//classpath 'me.tatarka:gradle-retrolambda:3.2.5'
}
}
......
......@@ -115,4 +115,5 @@ dependencies {
api 'com.tencent.tbs.tbssdk:sdk:43903'
//http请求库
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.bm.photoview:library:1.4.1'
}
......@@ -20,6 +20,7 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import com.bm.library.PhotoView;
import com.feihua.dialogutils.util.DialogUtils;
import java.io.File;
......@@ -88,19 +89,11 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private CardListProvider mProvider;
private OnCardClickListener mListener;
private DialogUtils dialog;
private ImageView photoView;
private PhotoView photoView;
private LinearLayout ll_bar;
private ProgressBar pb_loading;
private TextView tv_loading;
private boolean isDownloadCardImage = true;
private CallBack mCallBack;
public interface CallBack {
void onSearchStart();
void onSearchResult(List<Card> Cards, boolean isHide);
}
@SuppressLint("HandlerLeak")
Handler handler = new Handler() {
......@@ -129,7 +122,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
}
}
};
private CallBack mCallBack;
public CardDetail(BaseActivity context, ImageLoader imageLoader, StringManager stringManager) {
super(LayoutInflater.from(context).inflate(R.layout.dialog_cardinfo, null));
......@@ -383,6 +376,10 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
pb_loading = view.findViewById(R.id.pb_loading);
tv_loading = view.findViewById(R.id.tv_name);
pb_loading.setMax(100);
// 启用图片缩放功能
photoView.enable();
photoView.setOnClickListener(View -> {
dialog.dis();
});
......@@ -523,6 +520,12 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
return (T) findViewById(id);
}
public interface CallBack {
void onSearchStart();
void onSearchResult(List<Card> Cards, boolean isHide);
}
public interface OnCardClickListener {
void onOpenUrl(Card cardInfo);
......
......@@ -2,13 +2,19 @@
android:layout_height="match_parent"
android:layout_width="match_parent">
<ImageView
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
<!-- <ImageView-->
<!-- android:layout_marginLeft="1dp"-->
<!-- android:layout_marginRight="1dp"-->
<!-- android:id="@+id/photoView"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:scaleType="fitCenter" />-->
<com.bm.library.PhotoView
android:id="@+id/photoView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:scaleType="fitCenter" />
<LinearLayout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment