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="图片预览" /> +