简体   繁体   中英

Android 4.4.2 rendering issue

I am developing an android project for myself. Now i am stuck with this weird issue. My edit text control in my android project is rendering weird. I don't know why. It works fine in android M. I provided the xml code and screenshot below.

Screenshot

在此处输入图片说明

<?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"
    tools:context="bridge.com.fame.signup_activity">

    <include layout="@layout/toolbar_layout" />


    <RelativeLayout
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:background="@drawable/profilepicsignupholder"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="100dp"
        android:id="@+id/profile_pic_holder_layout">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/profile_pic"

            />




    </RelativeLayout>



<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_below="@+id/profile_pic_holder_layout"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_marginTop="31dp">

    <EditText
        android:layout_width="250dp"
        android:layout_height="50dp"
        android:hint="Password"
        android:textColor="#fff"
        android:fontFamily="sans-serif"
        android:inputType="textPassword"
        android:ems="10"
        android:id="@+id/passwordText"
        android:layout_below="@+id/userNameText"
        android:layout_centerHorizontal="true" />

    <EditText
        android:layout_width="250dp"
        android:layout_height="50dp"
        android:fontFamily="sans-serif"
        android:textColor="#fff"
        android:hint="Re-Enter Password"
        android:inputType="textPassword"
        android:ems="10"
        android:id="@+id/reenterpasswordText"
        android:layout_below="@+id/passwordText"
        android:layout_centerHorizontal="true" />

    <Button
        android:layout_width="260dp"
        android:background="@drawable/button_auth"
        android:layout_height="45dp"
        android:fontFamily="sans-serif"
        android:textAllCaps="false"
        android:text="Sign Me Up"
        android:id="@+id/signup_button_form"
        android:layout_marginTop="33dp"
        android:textColor="#fff"
        android:layout_below="@+id/reenterpasswordText"
        android:layout_alignLeft="@+id/reenterpasswordText"
        android:layout_alignStart="@+id/reenterpasswordText" />

    <EditText
        android:layout_width="250dp"
        android:layout_height="50dp"
        android:inputType="textPersonName"
        android:hint="Username"
        android:textColor="#fff"
        android:fontFamily="sans-serif"
        android:ems="10"
        android:id="@+id/userNameText"
        android:layout_alignParentTop="true"
        android:layout_alignLeft="@+id/passwordText"
        android:layout_alignStart="@+id/passwordText"
        android:selectAllOnFocus="false"
        android:singleLine="false" />
</RelativeLayout>

</RelativeLayout>

尝试将android:stateListAnimator="@null"到您发现此类问题的editext中。

if you are using

classpath 'com.android.tools.build:gradle:2.2.0-alpha1'

change build tools to

classpath 'com.android.tools.build:gradle:2.1.0'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM