我有一個editText
場在我的佈局爲:的EditText不自動滾動的第二個條目
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.dyces.teacher.app.MainActivity"> -->
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/snowcitblacker"
android:scaleType="centerCrop" />
<ImageView
android:layout_width="250dp"
android:layout_height="250dp"
android:src="@drawable/nocovertranss"
android:scaleType="fitCenter"
android:minWidth="450px"
android:minHeight="450px"
android:id="@+id/teachName"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:layout_alignLeft="@+id/guess"
android:layout_alignStart="@+id/guess" />
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/play"
android:layout_below="@+id/teachName"
android:layout_centerHorizontal="true"
android:layout_alignParentTop="true"
android:layout_marginTop="270dp"
android:id="@+id/play"/>
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/pause"
android:layout_toLeftOf="@+id/play"
android:layout_alignBottom="@+id/play"
android:id="@+id/pause"/>
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/stop"
android:layout_toRightOf="@+id/play"
android:layout_alignBottom="@+id/play"
android:id="@+id/stop"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="250dp"
android:minHeight="50dp"
android:hint="Enter Guess Here"
android:textColorHint="#ffffff"
android:textColor="#ffffff"
android:gravity="center"
android:id="@+id/guess"
android:paddingBottom="10dp"
android:layout_below="@+id/play"
android:layout_alignLeft="@+id/button2"
android:layout_alignStart="@+id/button2"
android:layout_marginTop="34dp"
android:inputType="textNoSuggestions"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Check"
android:textColor="#F0EEEE"
android:background="@drawable/buttonback"
android:minWidth="250dp"
android:id="@+id/button2"
android:layout_marginTop="33dp"
android:layout_below="@+id/guess"
android:layout_centerHorizontal="true" />
在運行我的手機上的應用程序,當我在editText
現場挖掘,佈局調整自己,使editText
字段正好在鍵盤上方並且可見。 問題是當我嘗試再次敲擊該字段時(最小化鍵盤後),佈局不會調整此時間。
在下面的兩張圖片中,在第一張屏幕截圖上,「Enter Guess Here」是editText
字段的提示,但在第二張屏幕截圖中,此字段現在被鍵盤隱藏。第二張屏幕截圖是在鍵盤被最小化之後拍攝的。
你使用scrollview作爲根容器嗎? –
你可以顯示你的完整佈局或主視圖組。 – Ranjit
@RanjitPati剛剛編輯整個佈局的問題。 –