2017-05-01 1 views
0

Ich möchte diese Benutzeroberfläche erstellen.Ich möchte diese UI erstellen

enter image description here

Ich habe diese Arbeit getan.

<RelativeLayout 
    android:layout_width="wrap_content" 
    android:layout_height="274dp" 
    android:layout_marginTop="40dp" 
    android:background="@drawable/car" 
    android:orientation="vertical"> 


    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     android:text="PP AUTOMATIVES" 
     android:textSize="18dp" 
     android:textStyle="bold" /> 

    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:src="@drawable/ratingimage" 
     /> 

    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentStart="true" 
     android:src="@drawable/offersimage" 


     /> 

    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:src="@drawable/heartimage" 

     /> 

    </RelativeLayout> 

    </RelativeLayout> 

Ich bin nicht in der Lage die Ausrichtung der Bilder einstellen und stellen Sie Hintergrundfarbe, Marge und den Stil der Textview nach „Officework“ UI.

+0

Ich empfehle Ihnen, 9-Patch-Bilder dafür zu verwenden und die dehnbaren Bereiche festzulegen. – HaroldSer

+0

Verwenden Sie stattdessen framelayout –

Antwort

0
<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="220dp" 
    android:layout_marginTop="40dp" 
    android:background="@drawable/car"> 

    <RelativeLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:background="#f7f7f8" 
     android:padding="2dp"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_centerVertical="true" 
      android:layout_margin="10dp" 
      android:text="PP AUTOMATIVES" 
      android:textColor="@color/white" 
      android:textSize="20sp" 
      android:textStyle="bold" /> 

    </RelativeLayout> 

    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:padding="2dp" 
     android:src="@drawable/ratingimage" /> 

    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentRight="true" 
     android:src="@drawable/offersimage" /> 

    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentRight="true" 
     android:padding="5dp" 
     android:src="@drawable/heartimage" /> 

</RelativeLayout> 
+0

Wie fügt man den Hintergrundschatten von "PP Automatives" TextView nach der "OfficeWork UI" hinzu? –

+0

Ich habe die Antwort bearbeitet – Maitri

Verwandte Themen