logo头像
Snippet 博客主题

APP适配安卓手机刘海屏

如果你想允许全屏界面内容显示到刘海区域 ,只要在AndroidManifest.xml文件里配置如下代码即可:

<!--适配华为(huawei)刘海屏-->
<meta-data
    android:name="android.notch_support"
    android:value="true"/>

<!--适配小米(xiaomi)刘海屏-->
<meta-data
    android:name="notch.config"
    android:value="portrait|landscape" />

安卓学习教程公众号

微信打赏

祝你事业顺心,富贵吉祥,赞赏鼓励