[英]Android EditText was not completely visible when keyboard appears
My EditText was not completely visible when the keyboard appears, it was visible till focus but is there any possibility to view complete EditText. 当键盘出现时,我的EditText并不完全可见,直到焦点出现为止,它都是可见的,但是有可能查看完整的EditText。
Layout 布局
<ScrollView
android:id="@+id/scrollvew_direct"
android:isScrollContainer="true"
android:layout_height="wrap_content">
<EditText
android:id="@+id/edt_employers_name"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="20dp"
android:layout_centerHorizontal="true"
android:inputType="text"
android:maxLength="100"
android:hint="@string/dir_deposit_6"
android:textSize="@dimen/edittextsize_sub"
android:gravity="center"
android:layout_gravity="center"
android:textColor="@color/main_header"
android:textColorHint="@color/hint_color_light"
android:background="@drawable/edittext_style"/>
</ScrollView>
In mainfest 在维护中
<activity
android:name=".activityname"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:theme="@android:style/Theme.Holo.Light.NoActionBar"/>
please guide me for proper solution. 请指导我寻求适当的解决方案。
在清单的活动标签中,添加此属性
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
In you activity tag of the manifest , add this property 在清单的活动标签中,添加此属性
android:windowSoftInputMode="adjustResize"
Edited : Edittext height is not fully matched to the background drawable 编辑 :Edittext高度与背景可绘制对象不完全匹配
make edittext as 使edittext为
android:layout_height="match_parent" or
android:layout_height="wrap_content"
and check it for me it is working 并为我检查它是否正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.