Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Theme.AppCompat.Light.NoActionBar AdjustResize does not work

So I am in the above situation: I am using the Theme.AppCompat.Light.NoActionBar so that I may use the new material design Toolbar. My XML structure is along the lines of:

    <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>

The problem is that no matter what I do android:windowSoftInputMode=adjustResize does not work. I have tried to assign weight to the ScrollView but to no effect. Googling this issue turned up no results but it is my impression from what I have seen so far that adjustResize does not work with this theme?

As requested, here is the portion of the manifest with the relevant activity:

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

Any help would be greatly appreciated

like image 889
Rakatan Avatar asked Feb 11 '26 03:02

Rakatan


1 Answers

Put this property in your root LinearLayout

    android:fitsSystemWindows="true"

Source: pablisco - windowSoftInputMode="adjustResize" not working with translucent action/navbar

like image 132
Clayton Avatar answered Feb 13 '26 18:02

Clayton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!