version:1.1.3

update:分包,增加空间信息,更换图标
bugfixes:
This commit is contained in:
2024-04-08 11:15:20 +08:00
parent cd5898287c
commit b6a4bf70e0
50 changed files with 1950 additions and 221 deletions

View File

@@ -7,129 +7,261 @@
tools:context=".activity.main.MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:background="@color/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="家庭空间"
android:textColor="@color/white"
android:textSize="@dimen/sp_15"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/constraintLayout3"
android:layout_width="@dimen/dp_120"
android:layout_height="match_parent"
android:background="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_pic"
android:layout_width="@dimen/dp_128"
android:layout_height="@dimen/dp_128"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_8"
android:background="@drawable/bg_dialog"
android:id="@+id/constraintLayout2"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_16"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="家庭空间"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout2">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_pic"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_64"
android:layout_gravity="end"
android:layout_marginTop="@dimen/dp_16"
android:background="@drawable/alarm_pressed_background">
<ImageView
android:id="@+id/iv_pic"
android:layout_width="@dimen/dp_44"
android:layout_height="@dimen/dp_44"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/home_icon_picture_normal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textView2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_8"
android:text="图片"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_video"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_64"
android:layout_gravity="end"
android:layout_marginTop="@dimen/dp_16"
app:layout_constraintStart_toEndOf="@+id/cl_pic"
app:layout_constraintTop_toTopOf="@+id/cl_pic">
<ImageView
android:id="@+id/iv_video"
android:layout_width="@dimen/dp_44"
android:layout_height="@dimen/dp_44"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/home_icon_video_normal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_8"
android:maxLines="1"
android:text="视频"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_doc"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_64"
android:layout_gravity="end"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@+id/cl_pic"
app:layout_constraintTop_toTopOf="@+id/cl_pic">
<ImageView
android:id="@+id/iv_doc"
android:layout_width="@dimen/dp_44"
android:layout_height="@dimen/dp_44"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/home_icon_doc_normal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textView3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_8"
android:maxLines="1"
android:text="文档"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:id="@+id/tv_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8"
android:maxLines="1"
android:textColor="@color/black"
android:textSize="@dimen/sp_7"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout5"
app:layout_constraintEnd_toEndOf="@+id/constraintLayout5"
app:layout_constraintStart_toStartOf="@+id/constraintLayout5" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout5"
android:layout_width="@dimen/dp_90"
android:layout_height="@dimen/dp_48"
android:layout_marginBottom="@dimen/dp_24"
android:background="@drawable/space_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/tv_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textColor="@color/white"
android:textSize="@dimen/sp_13"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="0.5GB/1GB" />
<TextView
android:id="@+id/tv_rank"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_space"
tools:text="普通版本" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@color/home_background_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/constraintLayout3"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"
android:layout_width="0dp"
android:layout_height="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_16"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:text="相册"
android:layout_marginEnd="@dimen/dp_4"
android:text="按时间顺序排序"
android:textColor="@color/black"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toTopOf="@+id/nv_pic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.shehuan.niv.NiceImageView
android:id="@+id/nv_pic"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_pic"
app:corner_radius="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/vl_video"
android:layout_width="@dimen/dp_128"
android:layout_height="@dimen/dp_128"
android:layout_marginStart="@dimen/dp_8"
android:background="@drawable/bg_dialog"
app:layout_constraintStart_toEndOf="@+id/cl_pic"
app:layout_constraintTop_toTopOf="@+id/cl_pic">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:text="视频"
android:textColor="@color/black"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toTopOf="@+id/nv_video"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.shehuan.niv.NiceImageView
android:id="@+id/nv_video"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_video"
app:corner_radius="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="@+id/imageView"
app:layout_constraintEnd_toStartOf="@+id/imageView"
app:layout_constraintTop_toTopOf="@+id/imageView" />
<ImageView
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:id="@+id/imageView"
android:layout_width="@dimen/dp_10"
android:layout_height="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_16"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/play"
app:layout_constraintBottom_toBottomOf="@+id/nv_video"
app:layout_constraintEnd_toEndOf="@+id/nv_video"
app:layout_constraintStart_toStartOf="@+id/nv_video"
app:layout_constraintTop_toTopOf="@+id/nv_video" />
android:src="@drawable/icon_dropdown"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/content"
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/constraintLayout4" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragment.pic.PictureFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".fragment.pic.PictureFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.369">
<ImageView
android:id="@+id/imageView3"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/no_data"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_32"
android:text="没有数据"
android:textColor="@color/defaultColor"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".fragment.pic.PictureFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.369">
<ImageView
android:id="@+id/imageView3"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/no_data"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_32"
android:text="没有数据"
android:textColor="@color/defaultColor"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@@ -6,13 +6,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
<com.shehuan.niv.NiceImageView
android:id="@+id/iv_pic"
android:layout_width="@dimen/dp_128"
android:layout_height="@dimen/dp_128"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:adjustViewBounds="true"
android:background="@color/white"
android:scaleType="centerCrop"
app:corner_radius="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -26,6 +26,7 @@
android:maxLines="2"
android:textColor="@color/lightGray"
android:textSize="@dimen/sp_9"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -2,14 +2,14 @@
<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/root"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="@dimen/dp_176"
android:layout_height="@dimen/dp_99"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -26,8 +26,8 @@
<com.shehuan.niv.NiceImageView
android:id="@+id/iv_status"
android:layout_width="@dimen/dp_48"
android:layout_height="@dimen/dp_48"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:src="@drawable/status_download"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -57,6 +57,7 @@
android:maxLines="2"
android:text=""
android:textColor="@color/black"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="@+id/constraintLayout"
app:layout_constraintStart_toStartOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout" />