I have the following layout:
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="@dimen/side_margin"
android:paddingTop="@dimen/layout_margin_large"
android:paddingEnd="@dimen/side_margin"
android:paddingBottom="@dimen/layout_margin_default">
<!-- Some oother stuff....-->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_default"
android:text="@string/optional_data" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/brand"
android:layout_marginTop="@dimen/layout_margin_default"
app:startIconDrawable="@drawable/baseline_store_24">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/model"
android:layout_marginTop="@dimen/layout_margin_default"
app:startIconDrawable="@drawable/baseline_directions_car_24">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/build_year"
android:layout_marginTop="@dimen/layout_margin_default"
app:startIconDrawable="@drawable/baseline_event_24">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="date" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/license_plate"
android:layout_marginTop="@dimen/layout_margin_default"
app:startIconDrawable="@drawable/baseline_pin_24">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vin"
android:layout_marginTop="@dimen/layout_margin_default"
app:startIconDrawable="@drawable/baseline_shield_car_24">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/note"
android:layout_marginTop="@dimen/layout_margin_default"
app:startIconDrawable="@drawable/baseline_notes_24">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:minLines="3"
/>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Which looks like this: https://jmp.sh/v/YgokjVB6XvyHAQqvoFlK
As you can see from the video, the issue I'm having is that when typing in the last TextInputEditText
, my entire layout/screen starts to vibrate/shake, at least when I am in the first two line, when typing in my minLine
(3) the vibration/shake stop or when I move the keyboard a little bit above the bottom line.
Removing the minLine
attribute would solve the problem, however I want to set a minimum amount of lines/minimum height and the optimal way to do this is by using the minLine
attribute.
I'm wondering what the issue might be? Is it maybe cause I don't have enough margin to the navigation bar?