安卓:软键盘覆盖编辑文本向上(或adjustresize adjustpan不工作) [英] Android : Soft Keyboard covering edit text up (adjustresize or adjustpan doesnt work)
问题描述
Android开发者...
我在开发Android应用的新。因此,我真的询问有关问题的缓慢或细节的解释:
-
作为标题,软键盘总是掩盖编辑文本。在adjustresize或adjustpan作品非。
-
我已经搜索这个问题,有人说,使应用程序不全屏。我已经让我自己简单的主题,只包括:
假
仍然/它不工作。因此,如何正确地禁用全屏? -
有人说用滚动视图。它是它唯一的答案?因为我宁愿使用相对或线性布局。
-
有没有简单的答案,使软键盘表现好?
感谢你这么多的帮助:D
诗:
- 安卓的minSdkVersion =7
- 我打靶2.1
- 有我的表现没有这样的隐式的主题,陈述的主题是全屏模式。
- 的尴尬是:我登录活动时,被的EditText向上滑动,以便为软键盘的房间。但每当这个活动又被称为,滑动为EditText上不工作。
这是我的活动XML:
<?XML版本=1.0编码=UTF-8&GT?;<的LinearLayout
的xmlns:机器人=http://schemas.android.com/apk/res/android
机器人:layout_width =FILL_PARENT
机器人:layout_height =FILL_PARENT
机器人:背景=@彩色/ BGCOLOR
机器人:方向=垂直> <的TextView
机器人:ID =@ + ID / textTitle
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:paddingTop =20dp
机器人:可点击=假
机器人:layout_gravity =CENTER_HORIZONTAL
机器人:文字=传送丹巴每日新闻/>
<的TextView
机器人:ID =@ + ID /文
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:paddingTop =30dp
机器人:文字=没有Rekening Tujuan:/>
<的EditText
机器人:ID =@ + ID / transferNoRek
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_gravity =CENTER_HORIZONTAL
安卓的inputType =数字
机器人:最大长度=20>
< /&的EditText GT;
<的TextView
机器人:ID =@ + ID /文
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:paddingTop =30dp
机器人:文字=Jumlah:/>
<的EditText
机器人:ID =@ + ID / transferJumlah
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_gravity =CENTER_HORIZONTAL
安卓的inputType =数字
机器人:最大长度=20>
< /&的EditText GT;
<的TextView
机器人:ID =@ + ID /文
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:paddingTop =30dp
机器人:文字=没有HP Tujuan:/>
<的EditText
机器人:ID =@ + ID / transferNoHP
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_gravity =CENTER_HORIZONTAL
安卓的inputType =数字
机器人:最大长度=15>
< /&的EditText GT;
<按钮
机器人:ID =@ + ID / transferButton
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_gravity =CENTER_HORIZONTAL
机器人:文字=Kirim
安卓的onClick =validatePin>
< /按钮>< / LinearLayout中>
我终于找到了答案,以我自己的问题。
我设置的android:windowSoftInputMode INT的标签不活动的实际活动。在我看来,它是因为标签活动是谁调用其他的活动之一。
感谢。
Android Developers...
I am new in developing android application. Thus, i really ask for a slow or details explanation about the problem:
As the title, the soft keyboard always covering up the edit text. Non of the adjustresize or adjustpan works.
I already search this problem, some people say to make the application not fullscreen. I already make my own simple theme which only consist: false still/ it doesnt work. Thus, how to disable full screen correctly?
Some people say to use scrollview. Is it the only answer for it? because i would rather to use relative or linear layout.
is there any simple answer to make the soft keyboard behaves well?
Thank you so much for your help :D
Ps:
- android:minSdkVersion="7"
- I am targetting for 2.1
- There is no such implicit theme on my manifest that state the theme is fullscreen mode.
- The awkward is: my login activity, the edittext is sliding up to make a room for the soft keyboard. but whenever this activity is called again, the sliding up for edittext does not working.
this is my activity xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/bgcolor"
android:orientation="vertical" >
<TextView
android:id="@+id/textTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:clickable="false"
android:layout_gravity="center_horizontal"
android:text="Transfer Tanpa Berita" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="30dp"
android:text="No Rekening Tujuan: " />
<EditText
android:id="@+id/transferNoRek"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:inputType="number"
android:maxLength="20">
</EditText>
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="30dp"
android:text="Jumlah: " />
<EditText
android:id="@+id/transferJumlah"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:inputType="number"
android:maxLength="20">
</EditText>
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="30dp"
android:text="No HP Tujuan: " />
<EditText
android:id="@+id/transferNoHP"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:inputType="number"
android:maxLength="15">
</EditText>
<Button
android:id="@+id/transferButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Kirim"
android:onClick="validatePin">
</Button>
</LinearLayout>
I finally find the answer to my own problem.
I set android:windowSoftInputMode int the Tab Activity not the actual activity. In my opinion, its because the Tab activity is the one who calls other activities.
Thanks.
这篇关于安卓:软键盘覆盖编辑文本向上(或adjustresize adjustpan不工作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!