查看相册和视频逻辑处理

This commit is contained in:
wangdongsheng
2021-09-03 18:35:02 +08:00
parent f441819c3b
commit a8e8d7b5d0
25 changed files with 767 additions and 315 deletions

View File

@@ -2,8 +2,7 @@
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M11.67,3.87L9.9,2.1 0,12l9.9,9.9 1.77,-1.77L3.54,12z"/>

View File

@@ -0,0 +1,5 @@
<vector android:alpha="1" android:height="40dp"
android:tint="#ffff" android:viewportHeight="40"
android:viewportWidth="40" android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M10,16.5l6,-4.5 -6,-4.5v9zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>

View File

@@ -1,32 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/full_image_root"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#F4EEEE" >
android:background="#F4EEEE">
<LinearLayout
android:id="@+id/rl_image_show"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:paddingTop="@dimen/top_pind_sp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_image_show"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_marginStart="15dp"
android:src="@drawable/icon_arrow"
/>
<TextView
android:id="@+id/tv_image_show"
android:layout_width="wrap_content"
style="@style/text_style_toolbar_title"
android:text="图片详情" />
</LinearLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/image_pager"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_image_show" />
<ImageView
android:id="@+id/download"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="15.0dip"
android:layout_marginRight="15.0dip"
android:src="@drawable/ic_baseline_arrow_back" />
<TextView
android:id="@+id/page_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/download"
android:layout_marginLeft="15.0dip"
android:textColor="#ffeeeeee"
android:textSize="12.0sp" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/rl_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:paddingTop="@dimen/top_pind_sp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_video"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_marginStart="15dp"
android:src="@drawable/icon_arrow"
/>
<TextView
android:id="@+id/tv_video"
android:layout_width="wrap_content"
style="@style/text_style_toolbar_title"
android:text="查看视频" />
</LinearLayout>
<cn.jzvd.JzvdStd
android:id="@+id/jz_video"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_user" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<RelativeLayout
android:id="@+id/rl_photo_album"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -25,32 +25,20 @@
<TextView
android:id="@+id/tv_event"
android:layout_toEndOf="@id/iv_photo_final"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content"
android:text="查看图片" />
</LinearLayout>
<TextView
android:id="@+id/tv_photo_album_delete"
android:layout_width="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="10dp"
style="@style/text_style_toolbar_title"
android:text="删除" />
<TextView
android:id="@+id/tv_photo_choose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="选择"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_photo_album"/>
</RelativeLayout>
<TextView
android:id="@+id/tv_photo_album_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="删除"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_photo_album"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/photo_album_recycler"
@@ -59,5 +47,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_photo_album_delete" />
app:layout_constraintTop_toBottomOf="@+id/rl_photo_album" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -157,6 +157,16 @@
android:text="点击录像"
android:textColor="@color/white"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_video_album"
style="@style/user_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:gravity="center"
android:text="点击查看成果"
android:textColor="@color/white"
android:textSize="15sp" />
</LinearLayout>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<RelativeLayout
android:id="@+id/rl_video_album"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -25,32 +25,19 @@
<TextView
android:id="@+id/tv_event"
android:layout_toEndOf="@id/iv_video_final"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content"
android:text="查看視頻" />
</LinearLayout>
<TextView
android:id="@+id/tv_video_album_delete"
android:layout_width="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="10dp"
style="@style/text_style_toolbar_title"
android:text="删除" />
<TextView
android:id="@+id/tv_video_choose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="选择"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_video_album"/>
<TextView
android:id="@+id/tv_video_album_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="删除"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rl_video_album"/>
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/video_album_recycler"
@@ -59,5 +46,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_video_album_delete" />
app:layout_constraintTop_toBottomOf="@+id/rl_video_album" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,27 +2,27 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_photo"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="5dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/check_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_photo"
android:layout_width="0dp"
android:layout_height="150dp"
android:layout_margin="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/check_photo"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
android:layout_margin="2dp"
android:buttonTint="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/iv_photo"
app:layout_constraintEnd_toEndOf="@+id/iv_photo" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -4,25 +4,34 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_video"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="5dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/ic_baseline_play"
app:layout_constraintBottom_toBottomOf="@+id/iv_video"
app:layout_constraintEnd_toEndOf="@+id/iv_video"
app:layout_constraintStart_toStartOf="@+id/iv_video"
app:layout_constraintTop_toTopOf="@+id/iv_video" />
<CheckBox
android:id="@+id/check_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_video"
android:layout_width="0dp"
android:layout_height="150dp"
android:layout_margin="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/check_video"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
android:layout_margin="2dp"
android:buttonTint="@color/white"
app:layout_constraintBottom_toBottomOf="@id/iv_video"
app:layout_constraintEnd_toEndOf="@id/iv_video" />
</androidx.constraintlayout.widget.ConstraintLayout>