属性android:windowSoftInputMode = "adjustPan"がAndroidManifest.xmlに指定されていますが、初めて動作します。textsoftignment property centerまたはcenter_horizantalのときにwindowssoftinputmode = Adjustpanが正しく動作していない
ソフトウェアキーボードが2度目に画面に表示されると、EditTextが完全に非表示になります。
イメージの説明画像を表示するには、ハイパーリンクを使用します。初めてEditTextを正しく実行する Click hereキーボードを非表示にしてもう一度開くもう一度問題が発生します。 click here
注:
1.AdjustResizeがAdjustPanのinstaedは仕事ですが、AdjustResize画像のサイズが変更されたので、私はadjustPanを必要としています。
2.私自身も、私のために働いていないPreImeで独自のEdittext(カスタム編集テキスト)を作成しようとしました。
3.テキストを削除するにはアライメントセンターが適切ですが、テキストアライメントセンターが必要です。
<?xml version="1.0" encoding="utf-8"?>
<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"
android:background="@drawable/background"
android:focusableInTouchMode="true"
tools:context="com.example.raj.testapp.MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
android:id="@+id/scroll">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#00ffffff"
android:layout_marginTop="25dp">
<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#ffffff"
android:alpha=".3"
android:textColorHint="@color/black"
android:textColor="@color/black"
android:hint="Username"
android:singleLine="true"
android:textAlignment="center"
android:fontFamily="sans-serif-light"
android:id="@+id/register_email"
android:textSize="20sp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#ffffff"
android:alpha=".3"
android:textColorHint="@color/black"
android:textColor="@color/black"
android:hint="First name"
android:singleLine="true"
android:textSize="20sp"
android:id="@+id/regiter_firstname"
android:layout_marginTop="25dp"
android:fontFamily="sans-serif-light"
android:textAlignment="center"/>
<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#ffffff"
android:alpha=".3"
android:textColorHint="@color/black"
android:textColor="@color/black"
android:hint="Lastname"
android:singleLine="true"
android:textSize="20sp"
android:id="@+id/regiter_lastname"
android:layout_marginTop="25dp"
android:fontFamily="sans-serif-light"
android:textAlignment="center"/>
<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#ffffff"
android:alpha=".3"
android:textColorHint="@color/black"
android:textColor="@color/black"
android:singleLine="true"
android:hint="Password"
android:textSize="22sp"
android:textAlignment="center"
android:id="@+id/regiter_password"
android:inputType="textPassword"
android:layout_marginTop="25dp"
android:fontFamily="sans-serif-light"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#ffffff"
android:alpha=".3"
android:textColorHint="@color/black"
android:textColor="@color/black"
android:singleLine="true"
android:hint="Confirm Password"
android:textAlignment="center"
android:layout_marginTop="25dp"
android:textSize="20sp"
android:inputType="textPassword"
android:id="@+id/register_confirm"
android:fontFamily="sans-serif-light"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Next"
android:layout_alignParentBottom="true"
android:fontFamily="sans-serif"
android:id="@+id/register_next"
android:layout_marginTop="25dp"
android:textColor="#ffffff"
android:textAllCaps="false"
android:background="@color/yellow"/>
</RelativeLayout>
マニフェストファイル
<activity android:name=".MainActivity"
android:configChanges="locale"
android:windowSoftInputMode="stateHidden|adjustPan">
あなたの隣のボタン隠れ確認パスワードEDITTEXT右 – Anil
@AnilDS、[はい、ちょうどあなたのscrollviewの元にパディングを与える[次へ]ボタンをeditext – Raj
を隠して言っている:50SPと – Anil