Я работаю над приложением, в котором реализовал прямую трансляцию видео, и у меня есть возможность размещать комментарии в реальном времени, как функция видео в Facebook.Проблема, с которой я сталкиваюсь, связана с EditTextView для комментариев.Когда на экране появляется программная клавиатура, она перемещает макет наверх.
Я попытался adjustResize
, adjsutPan
и настроить свойства Nothing в манифесте.Но эти свойства не соответствуют требованию пользовательского интерфейса.Я хочу просто переместить EditTextView в верхнюю часть Soft Keyboard и остальную часть макета, как есть.
Макет
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:background="@color/white"
android:clickable="true">
<org.webrtc.SurfaceViewRenderer
android:id="@+id/camera_view_renderer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:drawingCacheQuality="high"
android:fitsSystemWindows="true" />
<RelativeLayout
android:id="@+id/top_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:clipChildren="false"
android:clipToPadding="false">
<View
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@drawable/top_gradient" />
<include
android:id="@+id/headerLayout"
layout="@layout/header_layout" />
<com.lts.localee.customViews.LTextView
android:id="@+id/my_points"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/headerLayout"
android:gravity="center"
android:text=""
android:textColor="@color/white"
android:textSize="16dp" />
<com.lts.localee.customViews.PointsRangeComponent
android:id="@+id/points_range_component"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/headerLayout"
android:layout_marginBottom="120dp" />
<View
android:id="@+id/_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#AA2f3c43"
android:visibility="gone" />
<FrameLayout
android:id="@+id/livePredQuestionGameSubBaseContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="false" />
<com.lts.localee.customViews.LTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginTop="100dp"
android:background="@drawable/rounded_button_prediction_pressed"
android:gravity="center"
android:minWidth="60dp"
android:padding="10dp"
android:text="sadas"
android:textColor="@color/white"
android:textSize="18dp"
android:visibility="gone" />
</RelativeLayout>
<com.lts.localee.customViews.TriviaCommentComponent
android:id="@+id/comments_component"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:visibility="visible"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</RelativeLayout>
Пожалуйста, помогите мне решить эту проблему.Спасибо