Commit 926c5e84b3c6f8cdbc9ef5547fdf5807580cfa80
1 parent
ae79188a18
Exists in
master
框选页面添加查看原图
Showing
3 changed files
with
18 additions
and
0 deletions
Show diff stats
app/src/main/java/com/hjx/parent/ImageActivity.java
... | ... | @@ -330,6 +330,7 @@ public class ImageActivity extends BaseRxActivity<ActivityImageBinding> implemen |
330 | 330 | case R.id.tv_add: |
331 | 331 | Intent intent1 = new Intent(context, ImageSelectActivity.class); |
332 | 332 | intent1.putExtra("path", list.get(binding.viewPager.getCurrentItem()).getPath()); |
333 | + intent1.putExtra("source", list.get(binding.viewPager.getCurrentItem()).source); | |
333 | 334 | startActivityForResult(intent1, 1001); |
334 | 335 | break; |
335 | 336 | case R.id.tv_save: | ... | ... |
app/src/main/java/com/hjx/parent/ImageSelectActivity.java
... | ... | @@ -16,6 +16,7 @@ import android.view.View; |
16 | 16 | import android.widget.RelativeLayout; |
17 | 17 | |
18 | 18 | import com.hjx.parent.databinding.ActivityImageSelectBinding; |
19 | +import com.hjx.parent.dialog.PhotoViewDialog; | |
19 | 20 | import com.hjx.parent.dialog.TipDialog; |
20 | 21 | import com.prws.common.bean.CutPicBean; |
21 | 22 | import com.prws.common.bean.ImageBean; |
... | ... | @@ -108,6 +109,11 @@ public class ImageSelectActivity extends BaseActivity<ActivityImageSelectBinding |
108 | 109 | back(); |
109 | 110 | } |
110 | 111 | }); |
112 | + | |
113 | + String source = getIntent().getStringExtra("source"); | |
114 | + binding.btnShowSource.setOnClickListener(v -> { | |
115 | + new PhotoViewDialog(this).show(source); | |
116 | + }); | |
111 | 117 | } |
112 | 118 | |
113 | 119 | private void back() { | ... | ... |
app/src/main/res/layout/activity_image_select.xml
... | ... | @@ -28,6 +28,17 @@ |
28 | 28 | android:layout_marginLeft="5dp" |
29 | 29 | android:padding="10dp" |
30 | 30 | android:src="@mipmap/icon_back" /> |
31 | + | |
32 | + <TextView | |
33 | + android:id="@+id/btnShowSource" | |
34 | + android:layout_width="wrap_content" | |
35 | + android:layout_height="wrap_content" | |
36 | + android:layout_alignParentRight="true" | |
37 | + android:layout_centerVertical="true" | |
38 | + android:layout_marginRight="15dp" | |
39 | + android:text="查看原图" | |
40 | + android:textColor="#333333" | |
41 | + android:textSize="14sp" /> | |
31 | 42 | </RelativeLayout> |
32 | 43 | |
33 | 44 | <RelativeLayout | ... | ... |