mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Use M3 for bottom sheet
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
d0129b3f60
commit
3f25a71cc1
2 changed files with 48 additions and 47 deletions
|
@ -112,6 +112,8 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable {
|
|||
return binding.root
|
||||
}
|
||||
|
||||
override fun getTheme() = R.style.ThemeOverlay_Material3_BottomSheetDialog
|
||||
|
||||
private fun handleState(
|
||||
state: FileActionsViewModel.UiState
|
||||
) {
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
~ License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
~
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bottom_sheet"
|
||||
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:id="@+id/bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:minHeight="@dimen/bottom_sheet_min_height"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
|
||||
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||
|
@ -41,51 +41,50 @@
|
|||
android:layout_gravity="center"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottom_sheet_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/thumbnail_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/standard_padding"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/title">
|
||||
|
||||
<include
|
||||
android:id="@+id/thumbnail_layout"
|
||||
layout="@layout/file_thumbnail" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:lines="1"
|
||||
android:padding="@dimen/standard_padding"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/thumbnail_container"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Test file name which is very very very very very long.pdf" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_actions_list"
|
||||
android:id="@+id/bottom_sheet_content"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/standard_double_margin"
|
||||
android:layout_marginStart="@dimen/standard_padding"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include
|
||||
android:id="@+id/thumbnail_layout"
|
||||
layout="@layout/file_thumbnail"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/standard_padding"
|
||||
android:ellipsize="middle"
|
||||
android:lines="1"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
tools:text="Test file name which is very very very very very long.pdf" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_actions_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
Loading…
Reference in a new issue