while clicking on edittext my miui/mobile theme is crashing

75 Views Asked by At
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:padding="20dp"
tools:context=".UI.Activity.LoginActivity">

<ProgressBar
    android:id="@+id/my_plan_progress"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center" />


<RelativeLayout
    android:id="@+id/login_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/logo"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:src="@drawable/maxpe_logo" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/Email"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/logo"
        android:layout_marginTop="35dp"
        android:text="Phone No."
        android:textColor="@color/black" />

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/edt_phone_layout"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/Email">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/edt_phone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Enter Mobile No."
            android:inputType="number"
            android:maxLength="10"
            android:paddingLeft="15dp" />
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/Password"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/edt_phone_layout"
        android:text="Password."
        android:textColor="@color/black" />

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/edt_pass_layout"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/Password"
        app:endIconMode="password_toggle">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/passtextinput"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Enter Password"
            android:inputType="textPassword"
            android:paddingLeft="15dp" />
    </com.google.android.material.textfield.TextInputLayout>

    <Button
        android:id="@+id/btn_login"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/edt_pass_layout"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="20dp"
        android:background="@drawable/button_back"
        android:padding="15dp"
        android:text="Log In"
        android:textColor="@color/white" />


    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/btn_login"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"
        android:layout_marginRight="10dp">

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/forgot_pass"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:gravity="center"
            android:padding="5dp"
            android:text="Forget Password?"
            android:textColor="@color/app_color"
            android:textSize="15sp" />




    </RelativeLayout>


</RelativeLayout>

theme

    <style name="Theme.EcomaxgoAttendence" parent="Theme.MaterialComponents.DayNight.NoActionBar">
    <!-- Primary brand color. -->
    <item name="colorPrimary">@color/purple_500</item>
    <item name="colorPrimaryVariant">@color/purple_700</item>
    <item name="colorOnPrimary">@color/white</item>
    <item name="android:textColorSecondary">@color/app_color</item>
    <!-- Secondary brand color. -->
    <item name="colorSecondary">@color/teal_200</item>
    <item name="colorSecondaryVariant">@color/teal_700</item>
    <item name="colorOnSecondary">@color/black</item>
    <!-- Status bar color. -->
    <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
    <!-- Customize your theme here. -->
    </style>

i am trying this code which was running on my previous project but as soon i pasted this in my new project it is working fine with other devices only leaving few devices like redmi which is crashing when clicked on edittext

also nothing in java class nothing in logcat

theme or mobile ui is crashing not apk does anyone have any idea

0

There are 0 best solutions below