Is there a way to adjust my layout, to fit my layout?

In one of my signIn fragments, I want the layout elements to move up while the user is typing. I looked up many questions on stackoverflow but couldn’t find an answer.

Links I have gone to:

Manifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.android.moodboard">     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />      <application         android:allowBackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:roundIcon="@mipmap/ic_launcher_round"         android:supportsRtl="true"         android:theme="@style/Theme.AppCompat"         >         <activity             android:name=".MainActivity"             android:label="@string/app_name"             android:windowSoftInputMode="adjustPan|adjustResize"             >             <intent-filter>                 <action android:name="android.intent.action.MAIN" />                  <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>     </application>  </manifest> 

layout.xml

<androidx.constraintlayout.widget.ConstraintLayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toBottomOf="@+id/imageView2">          <TextView             android:id="@+id/textView8"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginTop="36dp"             android:text="Your E-mail:"             android:textColor="#000"             android:textSize="24sp"             android:textStyle="bold"             app:layout_constraintHorizontal_bias="0.5"             app:layout_constraintEnd_toEndOf="parent"             app:layout_constraintStart_toStartOf="parent"             app:layout_constraintTop_toTopOf="parent"              />          <com.google.android.material.textfield.TextInputLayout             android:id="@+id/edit_text_email_container"             android:layout_width="match_parent"             android:layout_height="wrap_content"             app:layout_constraintTop_toBottomOf="@+id/textView8"              >             <com.google.android.material.textfield.TextInputEditText                 android:id="@+id/editTextEmail"                 android:layout_width="match_parent"                 android:layout_height="55dp"                 android:layout_marginStart="64dp"                 android:layout_marginTop="40dp"                 android:layout_marginEnd="64dp"                 android:background="@drawable/email_edit_text"                 android:hint="example@example.com"                 android:textAlignment="center"                 android:textSize="18sp"                 android:textStyle="bold"                 app:layout_constraintEnd_toEndOf="parent"                 app:layout_constraintStart_toStartOf="parent"                 />         </com.google.android.material.textfield.TextInputLayout>          <Button             android:id="@+id/email_submit"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:background="@drawable/email_submit"             android:text="Next"             android:textColor="#ffffff"             android:textSize="18sp"             android:textStyle="bold"             android:layout_marginTop="40dp"             android:layout_marginStart="100dp"             android:layout_marginEnd="100dp"             app:layout_constraintEnd_toEndOf="parent"             app:layout_constraintStart_toStartOf="parent"             app:layout_constraintTop_toBottomOf="@+id/edit_text_email_container" />     </androidx.constraintlayout.widget.ConstraintLayout> 

The Layout image

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.