Reputation: 3
I want to create this UI.
I have done this work.
<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>
I am not able to set alignment of images and set background color, margin and style of TextView according to "OFFICEWork" UI.
Upvotes: 0
Views: 101
Reputation: 543
<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>
Upvotes: 1