reduce height of bottom bar (#4912)
back to what it was in Tusky 27 Api 29 before / after <img src="https://github.com/user-attachments/assets/e624b964-8bc5-41b0-b247-b5df082d67e1" width="280" /> <img src="https://github.com/user-attachments/assets/7696bacd-5d2d-42b2-aff4-e6fa46e8a35d" width="280" /> Api 35 before / after <img src="https://github.com/user-attachments/assets/232d96d6-1bf5-45d9-92dd-b825abb26a04" width="280" /> <img src="https://github.com/user-attachments/assets/8f9567dc-9f07-4560-b514-5f5230e4880a" width="280" />
This commit is contained in:
parent
b42c1e8eb5
commit
1b0e396c4c
3 changed files with 14 additions and 5 deletions
|
|
@ -38,6 +38,7 @@ import android.view.MenuInflater
|
|||
import android.view.MenuItem
|
||||
import android.view.MenuItem.SHOW_AS_ACTION_NEVER
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewGroup.LayoutParams
|
||||
import android.widget.ImageView
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
|
|
@ -264,6 +265,16 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
|
|||
insets
|
||||
} else {
|
||||
binding.viewPager.updatePadding(bottom = bottomBarHeight + bottomInsets)
|
||||
|
||||
/* BottomAppBar could handle size and insets automatically, but then it gets quite large,
|
||||
so we do it like this instead */
|
||||
binding.bottomNav.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
height = bottomBarHeight + bottomInsets
|
||||
}
|
||||
binding.bottomNav.updatePadding(bottom = bottomInsets)
|
||||
binding.bottomTabLayout.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
bottomMargin = bottomInsets
|
||||
}
|
||||
insets.inset(0, 0, 0, bottomInsets)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue