Commit 520009b7 authored by wanglei's avatar wanglei

...

parent 671eb07a
......@@ -45,6 +45,11 @@ class MediaBrowserActivity : BaseActivity<ActivityMediaBrowserBinding>() {
}
}
}
"Document" -> {
adapter = MediaAdapter(0)
}
}
binding.rv.adapter = adapter
......
......@@ -54,7 +54,7 @@ class FileFragment : BaseFragment<FragmentFileBinding>() {
moreAction = { view, bean ->
requireContext().showMediaMoreDialog(view,
deleteAction = {
requireContext().showDeleteTipDialog{
requireContext().showDeleteTipDialog {
runCatching { File(bean.path).delete() }
adapter.removeData(bean)
}
......@@ -105,6 +105,11 @@ class FileFragment : BaseFragment<FragmentFileBinding>() {
putExtra("tittle", "Video")
})
}
binding.llDocument.setOnClickListener {
requireActivity().startActivity(Intent(requireContext(), MediaBrowserActivity::class.java).apply {
putExtra("tittle", "Document")
})
}
}
......
......@@ -350,6 +350,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_document"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
......@@ -8,11 +8,15 @@
android:orientation="horizontal">
<androidx.cardview.widget.CardView
android:layout_width="45dp"
android:layout_height="45dp"
android:id="@+id/card"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginVertical="4dp"
android:layout_marginStart="8dp"
app:cardElevation="0dp">
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv"
......@@ -32,12 +36,15 @@
</androidx.cardview.widget.CardView>
<LinearLayout
android:id="@+id/ll"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="5dp"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/fl_more"
app:layout_constraintStart_toEndOf="@id/card"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_name"
......@@ -67,7 +74,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="?android:attr/selectableItemBackground"
android:padding="8dp">
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="wrap_content"
......@@ -76,5 +86,12 @@
tools:ignore="ContentDescription" />
</FrameLayout>
<View
android:layout_width="0dp"
android:layout_height="1px"
android:background="#E5E6EB"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/ll" />
</LinearLayout>
\ No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment