Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ fun View.applyRootSystemInsetsAsPadding(
fun ContentEditorBinding.applyImmersiveModeInsets(systemBars: Insets) {
val baseMargin = SizeUtils.dp2px(16f)
val isRtl = root.layoutDirection == View.LAYOUT_DIRECTION_RTL
val endInset = if (isRtl) systemBars.left else systemBars.right

val startInset = if (isRtl) systemBars.right else systemBars.left

btnFullscreenToggle.updateLayoutParams<ViewGroup.MarginLayoutParams> {
bottomMargin = baseMargin + systemBars.bottom
marginEnd = baseMargin + endInset
marginStart = baseMargin + startInset
}

bottomSheet.updatePadding(top = systemBars.top)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/content_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@
android:id="@+id/btn_fullscreen_toggle"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="bottom|end"
android:layout_gravity="bottom|start"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:padding="12dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_fullscreen"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/content_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@
android:id="@+id/btn_fullscreen_toggle"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="bottom|end"
android:layout_gravity="bottom|start"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:padding="12dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_fullscreen"
Expand Down
Loading