查看相册和视频逻辑处理

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

@@ -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>