2016-05-31 10 views
-1

Api level 20 Android editiertext auf api level 19 zeigt unerwünschte schatten aber api über 20 sieht gut aus. Wie behebe ich das?android editiertext auf api level 19 zeigen unerwünschte schatten aber api über 20 sieht gut aus

enter image description here

Diese meine XML-Datei wird in diesem sehr schlecht, Vielen Dank im Voraus .Stucked.

<TextView 
    android:id="@+id/tvHeadLogin" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_margin="10dp" 
    android:gravity="center" 
    android:text="Login" 
    android:textAppearance="?android:attr/textAppearanceLarge" /> 

<ScrollView 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical"> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal"> 

      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center" 
       android:src="@drawable/userid" /> 

      <android.support.design.widget.TextInputLayout 
       android:id="@+id/input_layout_email" 
       android:layout_width="0dp" 
       android:layout_height="wrap_content" 
       android:layout_weight="1" 
       android:hint="@string/hint_name" 
       android:textColorHint="@color/colorSecondaryText"> 

       <EditText 
        android:id="@+id/input_uname" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" /> 
      </android.support.design.widget.TextInputLayout> 
     </LinearLayout> 
     <!-- password input --> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal"> 

      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center" 
       android:src="@drawable/password" /> 

      <android.support.design.widget.TextInputLayout 
       android:id="@+id/input_layout_passkey" 
       android:layout_width="0dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="2dp" 
       android:layout_weight="1" 
       android:hint="@string/hint_pass" 
       android:textColorHint="@color/colorSecondaryText"> 

       <EditText 
        android:id="@+id/input_pasword" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:inputType="textPassword" /> 

      </android.support.design.widget.TextInputLayout> 
     </LinearLayout> 

     <TextView 
      android:id="@+id/tvForget" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_gravity="end" 
      android:clickable="true" 
      android:text="Forget Password ?" 
      android:textColor="#5f44e3" /> 

     <Button 
      android:id="@+id/btnLogin" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_gravity="center" 
      android:padding="10dp" 
      android:text="Login" 
      android:textStyle="bold" /> 
    </LinearLayout> 
</ScrollView> 

Android EditText auf api Ebene 19 zeigt unerwünschte Schatten aber api über 20 sieht gut aus. Wie behebe ich das?

+0

zeigen Sie Ihren XML-Code –

+0

bearbeiten Sie Ihre Frage und kopieren Sie einfügen. –

+0

ein Update Ihres Problems? –

Antwort

0

Wenn Sie keinen Hintergrund oder Schatten wollen, wenden Sie einfach einen Hintergrund auf den EditText an.

<EditText 
     android:id="@+id/usernameET" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@color/white" <!-- This --> 
     android:singleLine="true" 
     android:textColor="@color/editTextColor" 
     android:textColorHint="@color/editTextColor" 
     android:textSize="18sp" 
/> 
+0

danke Kumpel, aber ich möchte normale Ansicht mit Unterstreichung, wie es auf api 20 gut funktioniert, aber wenn ich es auf api 19 versuchte, wurde es ein Durcheinander. –

0

Es scheint, wie Ihr Layout ist nicht richtig zu machen, gehe ich davon aus Dingen wie Wellen-Effekte auch seltsame Kisten haben usw.

Versuchen Sie die Aktualisierung Ihrer gradle in Ihrem Projektebene baut auf die neueste Version Tools bauen. Gradel-Datei.

Wechsel:

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

zu

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

könnte auch dazu beitragen, zu überprüfen, ob alle anderen Abhängigkeiten auf dem neuesten Stand sind.

+0

Danke Kumpel, es rettet mich :) funktionieren perfekt –