<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>
主题
<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>
我正在尝试在我以前的项目上运行的这段代码,但是一旦我将其粘贴到我的新项目中,它就可以在其他设备上正常工作,只留下少数设备,如 redmi,单击edittext时崩溃
java类中也没有logcat中的任何内容
主题或移动 ui 崩溃不是 apk 有人知道吗