|
@@ -1,254 +0,0 @@
|
|
|
-<?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"
|
|
|
- tools:context=".ui.sample.media.MediaSampleActivity">
|
|
|
-
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatButton
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="选择文件夹"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- android:id="@+id/btn_choose_dir"
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
- />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatButton
|
|
|
- android:id="@+id/btn_query_from_files"
|
|
|
- android:layout_width="0dp"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="从FileMedia获取"
|
|
|
- android:textAllCaps="false"
|
|
|
- app:layout_constraintEnd_toStartOf="@id/btn_query_from_media_store"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/btn_choose_dir"/>
|
|
|
-
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatButton
|
|
|
- android:id="@+id/btn_query_from_media_store"
|
|
|
- android:layout_width="0dp"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="从MediaStore获取"
|
|
|
- android:textAllCaps="false"
|
|
|
- app:layout_constraintTop_toTopOf="@id/btn_query_from_files"
|
|
|
- app:layout_constraintStart_toEndOf="@id/btn_query_from_files"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
- />
|
|
|
-
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/id_tv_query_dir"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginTop="8dp"
|
|
|
- android:text="查询的目录:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/btn_query_from_files" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_dir"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/id_tv_query_dir"
|
|
|
- app:layout_constraintStart_toEndOf="@id/info_barrier"
|
|
|
- tools:text="ME" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/id_tv_query_type_title"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="获取方式:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/id_tv_query_dir" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_type"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/id_tv_query_type_title"
|
|
|
- app:layout_constraintStart_toEndOf="@id/info_barrier"
|
|
|
- tools:text="MediaStore" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_file_type_title"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="获取文件格式:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/id_tv_query_type_title" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_file_type"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/tv_file_type_title"
|
|
|
- app:layout_constraintStart_toEndOf="@id/info_barrier"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
- app:layout_constraintHorizontal_bias="0"
|
|
|
- app:layout_constrainedWidth="true"
|
|
|
- tools:text="pdf,png,jpg" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_ignore_child_dir_title"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="结果是否包含文件夹:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_file_type_title" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_ignore_child_dir"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/tv_query_ignore_child_dir_title"
|
|
|
- app:layout_constraintStart_toEndOf="@id/info_barrier"
|
|
|
- tools:text="true" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_recursively_title"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="是否遍历子文件夹:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_query_ignore_child_dir_title" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_recursively"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/tv_query_recursively_title"
|
|
|
- app:layout_constraintStart_toEndOf="@id/info_barrier"
|
|
|
- tools:text="true" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_ignore_child_files_title"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="忽略的文件:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_query_recursively_title" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/tv_query_ignore_child_files_title"
|
|
|
- android:text="(可忽略文件夹及文件)"
|
|
|
- app:layout_constraintStart_toEndOf="@id/tv_query_ignore_child_files_title"
|
|
|
- />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_query_ignore_child_files"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_query_ignore_child_files_title"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- tools:text="/" />
|
|
|
-
|
|
|
- <androidx.constraintlayout.widget.Barrier
|
|
|
- android:id="@+id/info_barrier"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- app:barrierDirection="end"
|
|
|
- app:constraint_referenced_ids="tv_file_type_title,tv_query_recursively_title,tv_query_ignore_child_dir_title,tv_query_ignore_child_files_title,id_tv_query_type_title"/>
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_line"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginVertical="16dp"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- android:text="------------------------------------->"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_query_ignore_child_files" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_line"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- android:text="查询结果"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- android:id="@+id/tv_result"
|
|
|
- />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_result_count_title"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginTop="8dp"
|
|
|
- android:text="数量:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_result" />
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_result_count"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/tv_result_count_title"
|
|
|
- app:layout_constraintStart_toEndOf="@id/info_barrier"
|
|
|
- tools:text="120" />
|
|
|
-
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_result_file_types_title"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginTop="8dp"
|
|
|
- android:text="结果文件格式:"
|
|
|
- android:textColor="@color/black"
|
|
|
- android:textStyle="bold"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_result_count_title" />
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <androidx.appcompat.widget.AppCompatTextView
|
|
|
- android:id="@+id/tv_result_file_types"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
- app:layout_constraintHorizontal_bias="0"
|
|
|
- app:layout_constrainedWidth="true"
|
|
|
- app:layout_constraintBaseline_toBaselineOf="@id/tv_result_file_types_title"
|
|
|
- app:layout_constraintStart_toEndOf="@id/info_barrier"
|
|
|
- tools:text="png jpg" />
|
|
|
-
|
|
|
-
|
|
|
- <androidx.recyclerview.widget.RecyclerView
|
|
|
- android:id="@+id/recycler_view"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="0dp"
|
|
|
- app:layout_constraintTop_toBottomOf="@id/tv_result_file_types_title"
|
|
|
- app:layout_constraintBottom_toBottomOf="parent"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
-
|
|
|
- />
|
|
|
-
|
|
|
-
|
|
|
-</androidx.constraintlayout.widget.ConstraintLayout>
|