鉴于钛被拉高时,键盘显示出来 [英] Titanium view being pushed up when keyboard shows up
问题描述
我有一个窗口(垂直布局),看起来像这样:
I have a window (vertical layout) that looks like this:
-Window
-View1
-View2
-ScrollView1
-ScrollView2
-TextArea (contained in the scrollView2)
当我集中在textarea的键盘来了,但是当这种情况发生视图1和视图2滚动起来,窗外。所以它看起来像现在这样:
When I focus in on the textarea the keyboard comes up, but when this happens View1 and View2 scroll up and out of the window. So it looks like this now:
-Window
-ScrollView1
-ScrollView2
-Textarea
-Keyboard
我需要这两种观点留在原地,并因为它包含了textarea的,如果它不是在一个滚动视图键盘重叠textarea的,因此用户不能看到它们所键入的内容只有内部scrollView1和scrollView2(scrollView2内容)。如何从被拉高停止视图1和视图2?我想如果我做了视图1和视图2 0的顶级物业,他们将永远留在原地。
I need these two views to stay put and only have the content inside scrollView1 and scrollView2 ( scrollView2 because it contains the textarea and if it is not in a scrollView the keyboard overlaps the textarea so users can't see what they are typing ). How to stop View1 and View2 from being pushed up? I thought if I made View1 and View2 with a top property of 0 that they would always stay put.
推荐答案
有你尝试使用以下清单档案中的
have you tried using following in your manifest file
android:windowSoftInputMode="adjustPan"
像这样
<activity
android:name="com.example.activity.YourActivity"
android:label="@string/title_activity_subscription_setup"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" >
</activity>
还有像adjustPan,adjustResize等等等等各种值试出来,看看有什么最适合你的情况。
there are various values like adjustPan, adjustResize etc etc. Try them out to see what works best for your situation.
这篇关于鉴于钛被拉高时,键盘显示出来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!