Attribut android: windowSoftInputMode = "adjustPan" wurde in der AndroidManifest.xml angegeben, aber es funktioniert nur das erste Mal.windowssoftinputmode = Adjustpan funktioniert nicht richtig, wenn texteigenschaft property center oder center_horizantal
Wenn die Software-Tastatur zum zweiten Mal auf dem Bildschirm angezeigt wird, wird mein EditText vollständig ausgeblendet.
Bild Beschreibung Verwenden Sie den Hyperlink für die Bilder. Zum ersten Mal EditText woks Richtig Click here verstecken und öffnen Sie die Tastatur Das zweite Mal Problem ist aufgetreten. click here
Hinweis:
1.AdjustResize von AdjustPan instaed ist Arbeit, aber ich brauche adjustPan weil AdjustResize das Bild angepasst wurde.
2.Ich habe es auch mit create Eigenen Editiertext (Custom Edittext) mit PreIme versucht, der auch bei mir nicht funktioniert.
3. Wenn Text entfernt Alignment-Center funktioniert ordnungsgemäß.Aber ich brauche Text Alignment Center.
<?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>
Manifest-Datei
<activity android:name=".MainActivity"
android:configChanges="locale"
android:windowSoftInputMode="stateHidden|adjustPan">
Ihr nächste Schaltfläche Versteck bestätigt Passwort editText rechts – Anil
@AnilDS, Sind Sie Schaltfläche Weiter sagen Ausblenden die EditExt – Raj
Ja gibt nur padding Ihre Scroll ab: 50SP und überprüfen – Anil