только что покрыто RelativeLayout
например,
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/back"
android:layout_width="30dp"
android:layout_height="40dp"
android:background="@drawable/bag" />
<TextView
android:layout_toRightOf="@+id/back"
android:layout_marginLeft="-10dp"
android:background="@drawable/circle_red"
android:id="@+id/text_count"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0 Items in cart"
android:textColor="@color/colorPrimaryDark" />
</RelativeLayout>
ps]
circle_red. xml
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#ff5722"/>
<corners android:radius="100dp"/>
</shape>
и это покажите вот так.
ps] сделать центр с помощью LinearLayout.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:weightSum="1">
<Button
android:id="@+id/snow"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:background="#909be7"
android:text="Want a Samyata Personal Shopper to find it for you?"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="#ffffff"
android:textSize="18sp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/listcount"
android:layout_width="30dp"
android:layout_height="40dp"
android:background="@mipmap/ic_launcher" />
<TextView
android:id="@+id/text_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-10dp"
android:layout_toRightOf="@+id/listcount"
android:background="@drawable/circle_red"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="0 Items in cart"
android:textColor="@color/colorPrimaryDark" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>