You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android 12+系统应用全局导航栏尺寸异常问题求助

Android 12及以上版本系统导航栏尺寸过大问题

我有一款两年前开发的应用,近期完成更新后,发现仅在Android 12及以上版本中出现系统导航栏尺寸过大的问题。已尝试创建新的空白Activity,问题依旧存在,属于应用全局问题。

相关截图

  • 深色模式运行截图:深色模式运行截图
  • 浅色模式运行截图:浅色模式运行截图
  • theme.xml截图:theme.xml截图

布局代码

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="ContentDescription">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?colorPrimaryVariant">

        <TextView
            android:id="@+id/splash_tvCreatorName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="25dp"
            android:fontFamily="@font/google_sans_regular"
            android:text="Hi, everyone!"
            android:textStyle="bold"
            android:textColor="?colorOnPrimary"
            android:textSize="@dimen/app_creator_name_size"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>

内容的提问来源于stack exchange,提问作者Adhse

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.28 04:50:59