フォームアクティビティでは、3つのフィールドがあります。サーバーにフォームを確認した後、それは終了し、前のアクティビティに進みます。しかし、問題は、キーボードがまだポップアップし、前の活動は入力フィールドを持っていない終了した後。 ここにレイアウトファイルがあります。EditTextフォーカスはアクティビティの終了後に行われません
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:background="@color/colorWhite"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_gravity="center"
android:layout_margin="20dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<sslwireless.com.easycorporate.Fonts.LoraBold
android:layout_marginBottom="20dp"
android:text="@string/change_password_title"
android:textSize="25sp"
android:textColor="@color/colorAccent"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/oldPassword"
android:background="@drawable/super_white_style"
android:padding="12dp"
android:layout_marginTop="15dp"
android:singleLine="true"
android:inputType="textPassword"
android:hint="@string/hints_old_password"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/newPassword"
android:background="@drawable/super_white_style"
android:padding="12dp"
android:layout_marginTop="15dp"
android:singleLine="true"
android:inputType="textPassword"
android:hint="@string/hints_new_password"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/confirmPassword"
android:background="@drawable/super_white_style"
android:padding="12dp"
android:layout_marginTop="15dp"
android:singleLine="true"
android:inputType="textPassword"
android:hint="@string/hints_confirm_password"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/changePassword"
android:text="@string/change_password"
android:layout_marginTop="20dp"
android:textColor="@color/colorWhite"
android:background="@drawable/primary_dark_color_style"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
</LinearLayout>
ここで実際に何が起こっていますか。
私はまた、マニフェストファイルの両方の活動のためにandroid:windowSoftInputMode="stateHidden"
を設定します。以前の活動に戻った後でフォーカスを削除する方法はありますか?近くkeybordのためのコードの下
はそう、あなたがしたいですある時点でソフトキーボードを隠す。右 ?自動的には起こりません。 –
そうですね。 –
なぜ私は投票を停止していますか? –