【发布时间】:2015-04-06 08:07:45
【问题描述】:
所以我处于上述情况:我正在使用Theme.AppCompat.Light.NoActionBar,以便我可以使用新的材料设计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
android:name=".activities.Information"
android:label="@string/title_activity_information"
android:launchMode="singleInstance"
android:parentActivityName=".activities.Account"
android:windowSoftInputMode="adjustResize|stateHidden" >
任何帮助将不胜感激
【问题讨论】:
-
adjustResize是什么意思?因为我没有这个问题。你能更详细地描述这个问题吗?还提供您完整的布局 xml 和您的 android 清单。