Padded all systems bars in all activities
This commit is contained in:
@ -35,16 +35,15 @@ class AboutActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.aboutText.updatePadding(top = 172)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
|
||||
if (!Utils.isDarkTheme(this))
|
||||
WindowInsetsControllerCompat(window, binding.root).isAppearanceLightStatusBars = true
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.aboutText.updatePadding(top = 172)
|
||||
|
||||
Utils.addActivity("about")
|
||||
|
||||
val text = String.format(getString(R.string.about_text),
|
||||
|
||||
@ -88,16 +88,15 @@ class AccountActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.AccountView.updatePadding(top = 172)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
|
||||
if (!Utils.isDarkTheme(this))
|
||||
WindowInsetsControllerCompat(window, binding.root).isAppearanceLightStatusBars = true
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.AccountView.updatePadding(top = 172)
|
||||
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
uri = binding.Uri
|
||||
|
||||
@ -37,16 +37,15 @@ class AccountsActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.AccountsView.updatePadding(top = 172)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
|
||||
if (!Utils.isDarkTheme(this))
|
||||
WindowInsetsControllerCompat(window, binding.root).isAppearanceLightStatusBars = true
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.AccountsView.updatePadding(top = 172)
|
||||
|
||||
aor = intent.getStringExtra("aor")!!
|
||||
Utils.addActivity("accounts,$aor")
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ class AudioActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.AudioView.updatePadding(top = systemBars.top + 56)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
@ -40,7 +40,7 @@ class CallDetailsActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.CallDetailsView.updatePadding(top = systemBars.top + 56)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
@ -45,7 +45,7 @@ class CallsActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.CallsView.updatePadding(top = systemBars.top + 56)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
@ -56,7 +56,7 @@ class ChatActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.ChatView.updatePadding(top = systemBars.top + 56)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
@ -49,7 +49,7 @@ class ChatsActivity: AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.ChatsView.updatePadding(top = systemBars.top + 56)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
@ -46,7 +46,7 @@ class CodecsActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.CodecsView.updatePadding(top = systemBars.top + 64)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
@ -104,16 +104,15 @@ class ConfigActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.ConfigView.updatePadding(top = 172)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
|
||||
if (!Utils.isDarkTheme(this))
|
||||
WindowInsetsControllerCompat(window, binding.root).isAppearanceLightStatusBars = true
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.ConfigView.updatePadding(top = 172)
|
||||
|
||||
Utils.addActivity("config")
|
||||
|
||||
baresipService = Intent(this@ConfigActivity, BaresipService::class.java)
|
||||
|
||||
@ -70,7 +70,7 @@ class ContactActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.ContactView.updatePadding(top = systemBars.top + 56)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
@ -42,7 +42,7 @@ class ContactsActivity : AppCompatActivity() {
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { v: View, insets: WindowInsetsCompat ->
|
||||
val systemBars: Insets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(0, systemBars.top, 0, systemBars.bottom)
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
if (Build.VERSION.SDK_INT >= 35)
|
||||
binding.ContactsView.updatePadding(top = systemBars.top + 56)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
|
||||
Reference in New Issue
Block a user