[英]Android onscreen button not visible with software keyboard
我有一个登录片段,在它上面是一个“后退”按钮(一个文本视图),在它下面是一个带有文本输入的滚动视图。 当我单击其中之一时,键盘出现,并将所有内容向上移动。 但是,我希望后退按钮始终可见。 我怎样才能做到这一点?
我尝试使用windowSoftInputMode播放,但没有得到想要的结果。
<RelativeLayout
android:id="@+id/backC"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/backbutton"
style="@style/backbuttonstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
/>
</RelativeLayout>
<ScrollView
android:id="@+id/signupscroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/backC"
>
//stuff is here
</RelativeLayout>
</ScrollView>
我不会将TextView用作后退按钮,而应使用.addToBackStack(null); 为此,您无需使其可见。 有关此方法的信息,请参见此处: http : //developer.android.com/reference/android/app/FragmentTransaction.html#addToBackStack%28java.lang.String%29
编辑:如果您不想摆脱后退按钮,请使用“ adjustPan”,请参见此处: http : //developer.android.com/guide/topics/manifest/activity-element.html#wsoft以获取文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.