ITPub博客

首页 > IT职业 > IT生活 > 使用SystemBarTint设置系统状态栏的问题

使用SystemBarTint设置系统状态栏的问题

IT生活 作者:winnie324 时间:2021-09-09 10:07:51 0 删除 编辑

使用布局 RelativeLayout 包含listView和EditText, 其中EditText在最底部, 如下,

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context="${relativePackage}.${activityClass}" >

    <ListView

        android:id="@+id/listView1"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_alignParentLeft="true"

        android:layout_alignParentTop="true"

        android:entries="@array/listen" 

        android:fitsSystemWindows="true"

        android:layout_above="@+id/editText2">

    </ListView>

<EditText

        android:id="@+id/editText2"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_alignParentLeft="true"

        android:layout_alignParentRight="true"

        android:layout_above="@+id/editText1"

        android:ems="10" >

    </EditText>

    <EditText

        android:id="@+id/editText1"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_alignParentLeft="true"

        android:layout_alignParentRight="true"

        android:layout_alignParentBottom="true"

        android:ems="10" >

        <requestFocus />

    </EditText>

</RelativeLayout> 

不设置状态栏时,点EditText弹出输入法,EditText会跟着输入法框上移, 使用SystemBarTint设置状态栏后,点EditText弹出输入法,输入法框覆盖掉了EditText,

求大神解决使用SystemBarTint设置状态栏后,点EditText弹出输入法,EditText不被覆盖,不胜感激!!!!

原文链接:http://www.apkbus.com/blog-172139-58848.html

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2093/viewspace-2817035/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Mybatis 插件原理
请登录后发表评论 登录
全部评论

注册时间:2019-04-16

  • 博文量
    66
  • 访问量
    412