Rounded corners on drawer fragment

pull/1722/head
Alex Baker 3 years ago
parent b008545b02
commit 1e4fa7c744

@ -42,6 +42,8 @@ class NavigationDrawerFragment : BottomSheetDialogFragment() {
@Inject lateinit var filterProvider: FilterProvider
@Inject lateinit var taskDao: TaskDao
override fun getTheme() = R.style.CustomBottomSheetDialog
private lateinit var recyclerView: RecyclerView
override fun onCreate(savedInstanceState: Bundle?) {

@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
android:background="@color/dialog_background">
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
<RelativeLayout
android:layout_width="match_parent"

@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
android:background="@color/dialog_background">
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
<RelativeLayout
android:layout_width="match_parent"

@ -1,17 +1,8 @@
<FrameLayout 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"
android:background="@color/drawer_color"
app:insetForeground="#4000">
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recycler_view"
android:scrollbarStyle="outsideOverlay"
android:paddingTop="@dimen/bottom_sheet_corners"
android:clipToPadding="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
tools:context=".NavigationDrawerFragment"/>
</FrameLayout>
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"/>

@ -7,7 +7,7 @@
<dimen name="keyline_second">32dp</dimen>
<dimen name="keyline_content_inset">56dp</dimen>
<dimen name="priority_button_width">40dp</dimen>
<dimen name="bottom_sheet_corners">12dp</dimen>
<dimen name="task_list_footer_height">88dp</dimen>
<dimen name="task_edit_text_size">16sp</dimen>

@ -305,4 +305,20 @@
<item name="boxStrokeColor">?attr/colorSecondary</item>
<item name="hintTextColor">?attr/colorSecondary</item>
</style>
<style name="CustomBottomSheetDialog" parent="@style/ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="bottomSheetStyle">@style/CustomBottomSheet</item>
</style>
<style name="CustomBottomSheet" parent="Widget.MaterialComponents.BottomSheet">
<item name="shapeAppearanceOverlay">@style/CustomShapeAppearanceBottomSheetDialog</item>
</style>
<style name="CustomShapeAppearanceBottomSheetDialog" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSizeTopRight">@dimen/bottom_sheet_corners</item>
<item name="cornerSizeTopLeft">@dimen/bottom_sheet_corners</item>
<item name="cornerSizeBottomRight">0dp</item>
<item name="cornerSizeBottomLeft">0dp</item>
</style>
</resources>

Loading…
Cancel
Save