From 796a3f42558856e7d2413f1cbe6415c90e97fbc6 Mon Sep 17 00:00:00 2001 From: sdwfqin <1245366907@qq.com> Date: Sat, 3 Feb 2018 16:06:49 +0800 Subject: [PATCH] =?UTF-8?q?fixbug=EF=BC=9A=E9=80=89=E6=8B=A9=E7=85=A7?= =?UTF-8?q?=E7=89=87=E5=BA=95=E9=83=A8=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quickseed/ui/home/HomeFragment.java | 28 ++++++++++++++++++- app/src/main/res/layout/fragment_home.xml | 6 ++++ quicklib/build.gradle | 4 +-- quicklib/src/main/res/layout/bottom_photo.xml | 15 ---------- quicklib/src/main/res/values/strings.xml | 2 +- 5 files changed, 36 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/sdwfqin/quickseed/ui/home/HomeFragment.java b/app/src/main/java/com/sdwfqin/quickseed/ui/home/HomeFragment.java index 322cf7e..be675fa 100644 --- a/app/src/main/java/com/sdwfqin/quickseed/ui/home/HomeFragment.java +++ b/app/src/main/java/com/sdwfqin/quickseed/ui/home/HomeFragment.java @@ -2,6 +2,8 @@ import android.content.Intent; import android.os.Build; +import android.support.design.widget.BottomSheetDialogFragment; +import android.support.v4.app.FragmentManager; import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -10,6 +12,7 @@ import com.sdwfqin.quicklib.module.WebViewActivity; import com.sdwfqin.quicklib.module.qrbarscan.QrBarScanActivity; import com.sdwfqin.quicklib.module.seeimage.SeeImageActivity; +import com.sdwfqin.quicklib.view.dialog.BottomDialogPhotoFragment; import com.sdwfqin.quicklib.view.dialog.HintDialog; import com.sdwfqin.quickseed.R; import com.sdwfqin.quickseed.base.Constants; @@ -60,7 +63,7 @@ protected void lazyLoad() { } - @OnClick({R.id.a, R.id.b, R.id.c, R.id.d}) + @OnClick({R.id.a, R.id.b, R.id.c, R.id.d, R.id.e}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.a: @@ -93,6 +96,29 @@ public void right() { strings.add("http://img.taopic.com/uploads/allimg/140729/240450-140HZP45790.jpg"); SeeImageActivity.launch(mContext, strings); break; + case R.id.e: + BottomDialogPhotoFragment.Builder builder = new BottomDialogPhotoFragment.Builder(); + BottomSheetDialogFragment bottomSheetDialogFragment = builder.setOnClickListener(new BottomDialogPhotoFragment.OnDialogClickListener() { + @Override + public void xiangce() { + + } + + @Override + public void paizhao() { + + } + + @Override + public void exit() { + + } + }).builder(); + FragmentManager fragmentManager = getFragmentManager(); + if (fragmentManager != null) { + bottomSheetDialogFragment.show(fragmentManager, "dialog"); + } + break; } } diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 2d6f07b..f9512a4 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -42,4 +42,10 @@ android:layout_height="wrap_content" android:text="图片预览" /> +