2
我的Android應用程序的第一個活動中有一個登錄屏幕。當用戶在填寫用戶名字段後選擇密碼字段時,彈出虛擬屏幕鍵盤並阻止密碼字段。用戶無法查看他們正在輸入的內容。我怎麼解決這個問題?如何修改表單,使鍵盤不會阻止它?
下面是我的main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout style="@style/LoginScreen" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fff"
>
<ListView android:id="@+id/listView1" android:layout_height="wrap_content" android:layout_width="match_parent"></ListView>
<ImageView android:id="@+id/imageView1" android:layout_height="wrap_content" android:layout_width="wrap_content" android:src="@drawable/logo"></ImageView>
<TextView android:textColor="#000" android:layout_width="wrap_content" android:id="@+id/textView1" android:layout_height="wrap_content" android:text="Enter your Google Account credentials:"></TextView>
<TextView style="@style/LoginLabel" android:layout_width="wrap_content" android:id="@+id/textView1" android:layout_height="wrap_content" android:text="Username:"></TextView>
<EditText android:layout_width="match_parent" android:id="@+id/login_username" android:layout_height="wrap_content"></EditText>
<TextView style="@style/LoginLabel" android:layout_width="wrap_content" android:id="@+id/textView2" android:layout_height="wrap_content" android:text="Password:"></TextView>
<EditText android:id="@+id/login_password" android:layout_height="wrap_content" android:layout_width="match_parent" android:password="true"></EditText>
<Button style="@style/LoginButton" android:id="@+id/login_button" android:layout_height="wrap_content" android:layout_width="match_parent" android:text="Login"></Button>
<LinearLayout android:id="@+id/linearLayout1" android:layout_height="wrap_content" android:layout_width="match_parent">
</LinearLayout>
大拇指給你的人。你讓我從瘋狂的事情中解脫出來解決了我的問題。 – 2016-11-02 23:56:02