身份证驾驶证添加查看大图
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
package com.arpa.mylibrary.pop
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
import android.widget.LinearLayout
|
||||
import com.arpa.mylibrary.R
|
||||
import com.arpa.mylibrary.callback.OnPicResultListener
|
||||
import com.arpa.mylibrary.utils.ConvertUtils
|
||||
import com.arpa.mylibrary.weight.GlideEngine
|
||||
import com.arpa.mylibrary.weight.ImageFileCompressEngine
|
||||
import com.luck.picture.lib.basic.PictureSelectionCameraModel
|
||||
@@ -12,7 +16,9 @@ import com.luck.picture.lib.basic.PictureSelector
|
||||
import com.luck.picture.lib.config.SelectMimeType
|
||||
import com.luck.picture.lib.entity.LocalMedia
|
||||
import com.luck.picture.lib.interfaces.OnResultCallbackListener
|
||||
import com.lxj.xpopup.XPopup
|
||||
import com.lxj.xpopup.core.BottomPopupView
|
||||
import com.lxj.xpopup.util.SmartGlideImageLoader
|
||||
|
||||
/**
|
||||
* @ClassName PopBottomPic
|
||||
@@ -22,6 +28,7 @@ import com.lxj.xpopup.core.BottomPopupView
|
||||
*/
|
||||
class PopNorBottomPic(
|
||||
context: Context,
|
||||
private var picUrl: String,
|
||||
onPicResultListener: OnPicResultListener
|
||||
) : BottomPopupView(context) {
|
||||
|
||||
@@ -40,6 +47,11 @@ class PopNorBottomPic(
|
||||
var paizhao = findViewById<Button>(R.id.btn_paizhao)
|
||||
var xiangce = findViewById<Button>(R.id.btnXiangce)
|
||||
var btnQuxiao = findViewById<Button>(R.id.btn_quxiao)
|
||||
// var btnSeeBig = findViewById<Button>(R.id.btnSeeBig)
|
||||
// var llSeeBig = findViewById<LinearLayout>(R.id.llSeeBig)
|
||||
// llSeeBig.visibility = if (picUrl.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||
// btnSeeBig.setOnClickListener {
|
||||
// }
|
||||
paizhao.setOnClickListener {
|
||||
|
||||
// 单独拍照
|
||||
|
||||
@@ -59,7 +59,22 @@ class PopsUtils private constructor(){
|
||||
|
||||
XPopup.Builder(ctx)
|
||||
.dismissOnTouchOutside(true)
|
||||
.asCustom(PopNorBottomPic(ctx, listenter))
|
||||
.asCustom(PopNorBottomPic(ctx, "", listenter))
|
||||
.show()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择照片 拍照或者相机
|
||||
*
|
||||
* @param ctx
|
||||
* @param listenter
|
||||
*/
|
||||
fun showSimSelPic2(ctx: Context,picUrl:String, listenter: OnPicResultListener){
|
||||
|
||||
XPopup.Builder(ctx)
|
||||
.dismissOnTouchOutside(true)
|
||||
.asCustom(PopNorBottomPic(ctx,picUrl, listenter))
|
||||
.show()
|
||||
}
|
||||
|
||||
|
||||
@@ -40,23 +40,48 @@
|
||||
android:layout_marginLeft="@dimen/dp_18"
|
||||
android:layout_marginRight="@dimen/dp_18"
|
||||
android:background="#EEEEEE" />
|
||||
<Button
|
||||
android:id="@+id/btn_paizhao"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:text="拍照"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_18"
|
||||
android:layout_marginRight="@dimen/dp_18"
|
||||
android:background="#EEEEEE" />
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/llSeeBig"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/btnSeeBig"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:text="查看大图"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_18"
|
||||
android:layout_marginRight="@dimen/dp_18"
|
||||
android:background="#EEEEEE" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_paizhao"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:text="拍照"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_18"
|
||||
android:layout_marginRight="@dimen/dp_18"
|
||||
android:background="#EEEEEE" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_quxiao"
|
||||
|
||||
Reference in New Issue
Block a user