File tree Expand file tree Collapse file tree
kotlin/org/vestifeed/feeds Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ import android.widget.EditText
1313import androidx.activity.result.contract.ActivityResultContracts
1414import androidx.appcompat.app.AlertDialog
1515import androidx.core.os.bundleOf
16+ import androidx.core.view.ViewCompat
17+ import androidx.core.view.WindowInsetsCompat
18+ import androidx.core.view.updatePadding
1619import androidx.fragment.app.commit
1720import androidx.lifecycle.Lifecycle
1821import androidx.lifecycle.lifecycleScope
@@ -96,6 +99,13 @@ class FeedsFragment : AppFragment() {
9699 override fun onViewCreated (view : View , savedInstanceState : Bundle ? ) {
97100 super .onViewCreated(view, savedInstanceState)
98101
102+ ViewCompat .setOnApplyWindowInsetsListener(binding.toolbar) { v, insets ->
103+ insets.getInsets(WindowInsetsCompat .Type .statusBars()).let {
104+ v.updatePadding(top = it.top)
105+ }
106+ insets
107+ }
108+
99109 binding.toolbar.setOnMenuItemClickListener {
100110 when (it.itemId) {
101111 R .id.importFeeds -> importFeedsLauncher.launch(" */*" )
Original file line number Diff line number Diff line change 33<androidx .constraintlayout.widget.ConstraintLayout xmlns : android =" http://schemas.android.com/apk/res/android"
44 xmlns : app =" http://schemas.android.com/apk/res-auto"
55 android : layout_width =" match_parent"
6- android : layout_height =" match_parent"
7- android : fitsSystemWindows =" true" >
6+ android : layout_height =" match_parent" >
87
98 <com .google.android.material.appbar.MaterialToolbar
109 android : id =" @+id/toolbar"
You can’t perform that action at this time.
0 commit comments