How to add a circular image on Image view as the below image:
and this is the code I have:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
xmlns:card_view="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_margin="3dp"
card_view:cardBackgroundColor="@color/colorwhite"
card_view:cardCornerRadius="8dp"
card_view:cardUseCompatPadding="false"
card_view:elevation="15dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<ImageView
android:id="@+id/flag"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:scaleType="fitXY"
android:src="@drawable/mac_img" />
<TextView
android:id="@+id/titleTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="85dp"
android:textStyle="bold"
android:textColor="@color/colorwhite"
android:layout_centerHorizontal="true" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
as I am trying also add the a text view like is shown in the image like the Closed
, So all I need I want the way to do this as to put widgets like this way as in the figure..