Skip to content

Commit

Permalink
refactor: support Android 15 edge-to-edge system bars
Browse files Browse the repository at this point in the history
  • Loading branch information
fankes committed Nov 25, 2024
1 parent 259eb1d commit cd38dbf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
*
* This file is created by fankes on 2022/1/30.
*/
@file:Suppress("UNCHECKED_CAST")
@file:Suppress("DEPRECATION")

package com.fankes.miui.notify.ui.activity.base

import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.res.ResourcesCompat
Expand Down Expand Up @@ -53,6 +54,7 @@ abstract class BaseActivity<VB : ViewBinding> : AppCompatActivity() {
name = "inflate"
param(LayoutInflaterClass)
}?.get()?.invoke<VB>(layoutInflater) ?: error("binding failed")
if (Build.VERSION.SDK_INT >= 35) binding.root.fitsSystemWindows = true
setContentView(binding.root)
/** 隐藏系统的标题栏 */
supportActionBar?.hide()
Expand Down

0 comments on commit cd38dbf

Please sign in to comment.