Why is this checkbox not showing on my Samsung Galaxy S10 Plus nor Android 10 Emulator?-ThrowExceptions

Exception or error:

Why isn’t this checkbox showing up on my Samsung Galaxy S10 Plus nor on a emulator running Android 10?

I have tried two more emulators: one running Android 5.2 and other one running Android 6.1, and in those it works properly.

Here is my code:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#F5F5F5"
android:paddingLeft="16dp"
android:paddingTop="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
tools:ignore="HardcodedText">

<EditText
    android:id="@+id/et_login_email"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/Titulo"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="39dp"
    android:ems="10"
    android:hint="Email"
    android:autofillHints="@android:string/autofill"
    android:textSize="24sp"
    android:inputType="textEmailAddress"
    tools:targetApi="o_mr1">

    <requestFocus />
</EditText>

<EditText
    android:id="@+id/et_login_clave"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/et_login_email"
    android:layout_alignLeft="@+id/et_login_email"
    android:layout_marginTop="39dp"
    android:ems="10"
    android:hint="Contraseña"
    android:inputType="textPassword"
    android:textSize="24sp" />

<Button
    android:id="@+id/bt_login_entrar"
    style="@style/Widget.AppCompat.Button"
    android:layout_width="140dp"
    android:layout_height="wrap_content"
    android:layout_below="@+id/et_login_clave"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="39dp"
    android:text="Iniciar sesión"
    android:textAppearance="@style/TextAppearance.AppCompat.Body1"
    android:textSize="19sp"
    android:typeface="normal" />

<TextView
    android:id="@+id/tv_login_registrarse"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/bt_login_entrar"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="39dp"
    android:text="Registrarse"
    android:textColor="#FF9800"
    android:textSize="17sp"
    android:textStyle="bold" />

<TextView
    android:id="@+id/Titulo"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:gravity="center_horizontal"
    android:text="Hotel Dumbría"
    android:textColor="#2196F3"
    android:textSize="36sp"
    android:textStyle="bold"
    android:typeface="normal" />

<ProgressBar
    style="?android:attr/progressBarStyle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/tv_login_registrarse"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="25dp"

    android:id="@+id/progressBarConfirmacionReservas" />

<CheckBox
    android:id="@+id/chk_guardar_login"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/et_login_clave"
    android:layout_marginTop="4dp"
    android:layout_centerHorizontal="true"
    android:text="Guardar Login" />

</RelativeLayout>
How to solve:

It could be displayed “under the screen” as the emulator and your phone can have different screen sizes and ratios. Try for example deleting something above it and re-installing the application on your phone again! If that’s the case, here you can find all the information you need to make a scrollview!

Hope this helped!

Leave a Reply

Your email address will not be published. Required fields are marked *