【发布时间】:2021-10-16 12:44:06
【问题描述】:
我有这个回收站视图
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/serviceRecyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/addNewServiceBtn"
app:layout_constraintBottom_toBottomOf="parent"
android:paddingBottom="10dp"
android:layout_marginTop="20dp"
/>
里面有这个
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/serviceSelectExpertRegisterContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/border_edit_text"
android:layout_marginHorizontal="20dp"
android:paddingVertical="5dp"
>
<Spinner
android:id="@+id/serviceSelectExpertRegister"
android:layout_width="match_parent"
android:layout_height="30dp"
app:layout_constraintTop_toTopOf="parent"
android:spinnerMode="dropdown"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<EditText
android:id="@+id/serviceDescriptionExpertRegister"
app:layout_constraintTop_toBottomOf="@+id/serviceSelectExpertRegisterContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:hint="@string/service_description"
android:background="@drawable/border_edit_text"
android:padding="8dp"
android:layout_marginTop="15dp"
android:gravity="top|start"
android:inputType="textMultiLine"
android:lines="3"
android:textColor="@color/light_grey"
/>
当我打开我的键盘时,它会缩小,如图所示 this is the shrinked image
我已经尝试过 android:windowSoftInputMode="adjustPan"(以及所有其他 windowSoftInputModes),但它仍然有相同的反应。
有什么办法可以让布局上升并影响任何事情。
【问题讨论】:
-
这个问题解决了吗?我也面临同样的问题。
标签: android xml android-layout android-recyclerview