1
<RelativeLayout>

    <AppBarLayout>

        ...

    </AppBarLayout>

    <LinearLayout
        android:id="@+id/tool_list"
        android:layout_width="match_parent"
        android:layout_height="@dimen/editor_item_size"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal">

        ...

    </LinearLayout>

    <ScrollView
        android:id="@+id/custom_setting_panel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/tool_list"
        android:layout_below="@id/appBarLayout">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:id="@+id/category_area"
                android:layout_width="match_parent"
                android:layout_height="56dp">

                ...

            </LinearLayout>

            <LinearLayout
                android:id="@+id/title_area"
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:layout_below="@id/category_area"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="@dimen/editor_item_size"
                    android:layout_height="match_parent"/>

                <EditText
                    android:id="@+id/title_edit"
                    android:layout_width="match_parent"
                    android:layout_height="40dp"/>

            </LinearLayout>

            <View
                android:id="@+id/divider"
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_below="@+id/title_area"
                android:background="@color/colorDivider" />

            <jp.wasabeef.richeditor.RichEditor
                android:id="@+id/editor"
                android:layout_width="match_parent"
                android:layout_height="250dp"
                android:layout_below="@id/divider"/>

        </RelativeLayout>

    </ScrollView>

</RelativeLayout>

this is my writeActivity.xml

when i clicked title_edit like this.

before

i want this flow like below picture.

what i want

but it's doesn't work way i wanted it to.

it work like this.

what i don't want

i think i was able to do it this way before, but i think i got it wrong.

i've added a scrolling view, but it doesn't seem to make any difference.

how can I do picture 2 ?

01hanst
  • 389
  • 5
  • 15
  • Possible duplicate of [How to move the layout up when the soft keyboard is shown android](https://stackoverflow.com/questions/9111813/how-to-move-the-layout-up-when-the-soft-keyboard-is-shown-android) – Navneet Krishna Apr 05 '18 at 15:21
  • uhm...is it cause by richeditor? it inherited webview. – 01hanst Apr 05 '18 at 15:33

1 Answers1

1

in your app manifest file for that activity use android:windowSoftInputMode="adjustResize" and add android:fitsSystemWindows="true" to the root RelativeLayout. Hopefully that'll do it

mononz
  • 426
  • 5
  • 17
  • Bugger, that should do it :/ Can you show your manifest file? – mononz Apr 05 '18 at 15:25
  • @monoz sure, wait a minute – 01hanst Apr 05 '18 at 15:27
  • added a note from here https://stackoverflow.com/a/21860837/6407116 to use fitsSystemWindows in your root relative layout. Also try without the adjustPan temporarily – mononz Apr 05 '18 at 15:35
  • Must be to do with the rich editor. I'd suggest to comment it out in the xml and test the keyboard with tool_list working correctly, then put it back in. sorry :( – mononz Apr 05 '18 at 15:45
  • thank you for help. i'll considering change richeditor to edittext. – 01hanst Apr 05 '18 at 15:48