爲什麼我的EditText不可編輯?爲什麼我的EditText不可編輯?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="2"
tools:context="com.example.musicvideomaker.ProjectSettingsX"
>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:text="Project Name"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:singleLine="true" >
<requestFocus />
</EditText>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="50dp"
android:text="Save" />
</LinearLayout>
我在模擬器中運行應用程序,我無法更改EditText。當我觸摸它時,鍵盤不會出現。我曾在多個模擬器上嘗試過。
是的,當我這樣做時,鍵盤似乎顯示出來。 – iOSAaronDavid
總是樂於幫助:) –