Skip to content

Commit

Permalink
优化图片预览菜单,优化fragmentation-dialog库
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-P-J committed Feb 14, 2021
1 parent ac7a871 commit 093896f
Show file tree
Hide file tree
Showing 14 changed files with 693 additions and 502 deletions.
499 changes: 267 additions & 232 deletions app/proguardMapping.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
import com.bumptech.glide.request.transition.Transition;
import com.zpj.fragmentation.ISupportFragment;
import com.zpj.fragmentation.SupportHelper;
import com.zpj.fragmentation.dialog.base.ArrowDialogFragment;
import com.zpj.fragmentation.dialog.impl.ArrowMenuDialogFragment;
import com.zpj.fragmentation.dialog.impl.AttachListDialogFragment;
import com.zpj.fragmentation.dialog.impl.ImageViewerDialogFragment3;
import com.zpj.fragmentation.dialog.model.OptionMenu;
import com.zpj.fragmentation.dialog.photoview.PhotoView;
import com.zpj.fragmentation.dialog.widget.LoadingView;
import com.zpj.shouji.market.R;
Expand Down Expand Up @@ -78,11 +81,10 @@ public void onPageSelected(int position) {
});

btnMore.setOnClickListener(v -> {
new AttachListDialogFragment<String>()
.addItems("分享图片", "保存图片", "设为壁纸")
.addItemIf(isOriginalImageAvailable(), "查看原图")
// .setOnDismissListener(this::focusAndProcessBackPress)
.setOnSelectListener((fragment, pos, text) -> {
new ArrowMenuDialogFragment()
.addOptionMenus("分享图片", "保存图片", "设为壁纸")
.addOptionMenuIf(isOriginalImageAvailable(), "查看原图")
.setOnItemClickListener((pos, menu) -> {
switch (pos) {
case 0:
PictureUtil.shareWebImage(context, getOriginalImageUrl());
Expand Down
Loading

0 comments on commit 093896f

Please sign in to comment.