Подтвердить что ты не робот

Как исправить нижний относительный макет, когда приходит мягкая клавиатура?

Когда я что-то пишу в тексте редактирования в своем приложении, мягкая клавиатура поставляется вместе с нижним относительным расположением. Я хочу исправить нижнюю относительную позицию макета. Любая помощь будет принята с благодарностью.

4b9b3361

Ответ 1

Я предполагаю, что Падма Кумар означал android:windowSoftInputMode="adjustNothing" в вашем ярлыке активности.

Ответ 2

добавьте это в свой тег активности в файл manifest.xml

android:softinputmode="adjustNothing"

Ответ 3

Сделайте фальшивый макет с любым значением высоты, затем ссылайтесь на него:

<RelativeLayout
   android:id="@+id/rl_fake"
   android:layout_width="fill_parent"
   android:layout_height="320dp" >
</RelativeLayout>

<RelativeLayout
   android:id="@+id/rl_main_view"
   android:layout_width="fill_parent"
   android:layout_height="wrap_content" >
   ...
</RelativeLayout>
...
<RelativeLayout
   android:id="@+id/rl_problem"
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:layout_alignParentBottom="true"
   android:layout_below="@+id/rl_fake" >
   ...
</RelativeLayout>

Ответ 4

В Относительном макете вставьте следующий код

  <LinearLayout
        android:id="@+id/ll_button"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:gravity="center"
        android:orientation="horizontal"
        android:layout_marginTop="@dimen/_16dp">

        <Button
            android:id="@+id/btn_continue"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/colorPrimary"
            android:text="@string/conti"
            android:padding="@dimen/_8dp"
            android:textColor="@color/white"
            android:textSize="@dimen/_16sp" />
    </LinearLayout>