问题描述
我的观点有问题。我有一个文本视图和一个带有图像视图的线性布局。线性布局具有一个称为
的属性android:fitsSystemWindows="true"
我的活动已启用
android:windowSoftInputMode="adjustResize"
,以便当焦点键盘处于打开状态时,具有该图像视图的线性布局将停留在焦点键盘上方,否则它将停留在底部。 问题是每当我键入4或5行时,编辑文本的光标就会被线性布局所阻塞。尽管我可以键入它,但是我需要向下滚动才能看到我的文本和光标。
我的xml代码如下:
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/edtAnswer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/fifteen_margin"
android:layout_marginTop="@dimen/ten_margin"
android:background="@android:color/transparent"
android:hint="@string/add_answer"
android:inputType="textCapSentences|textMultiLine|text"
android:textColor="@color/text_hint"
app:backgroundTint="@color/edit_text_color" />
<LinearLayout
android:id="@+id/llChooser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:padding="10dp"
android:windowSoftInputMode="adjustResize"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/ivAnswerImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_desc_image"
android:src="@drawable/ic_choose_photo" />
</LinearLayout>
有人可以帮助我吗?每当更改线条时,我都需要使光标和文本可见。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)