gpt4 book ai didi

android - Theme.AppCompat.Light.NoActionBar AdjustResize 不起作用

转载 作者:太空狗 更新时间:2023-10-29 13:21:21 27 4
gpt4 key购买 nike

所以我处于上述情况:我正在使用 Theme.AppCompat.Light.NoActionBar 以便我可以使用新的 Material 设计 Toolbar。我的 XML 结构是这样的:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<include
android:id="@+id/toolbar"
layout="@layout/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<ScrollView
android:id="@+id/personalInfo_scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- textviews and various other form-related elements -->

</ScrollView>

</LinearLayout>

问题是无论我做什么 android:windowSoftInputMode=adjustResize 都不起作用。我试图为 ScrollView 分配权重,但没有效果。谷歌搜索这个问题没有结果,但据我目前所见,我的印象是 adjustResize 不适用于这个主题?

根据要求,这是具有相关 Activity 的 list 部分:

<activity
android:name=".activities.Information"
android:label="@string/title_activity_information"
android:launchMode="singleInstance"
android:parentActivityName=".activities.Account"
android:windowSoftInputMode="adjustResize|stateHidden" >

任何帮助将不胜感激

最佳答案

将此属性放在您的根 LinearLayout 中

    android:fitsSystemWindows="true"

来源:帕布利斯科- windowSoftInputMode="adjustResize" not working with translucent action/navbar

关于android - Theme.AppCompat.Light.NoActionBar AdjustResize 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28361423/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com