实现圆角效果,看图:
整体布局
代码:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_below="@+id/tv_unit"
android:layout_marginTop="@dimen/dp30"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/acount_money_tv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp10"
android:textColor="@color/white"
android:textSize="@dimen/sp45"
tools:text="¥200.00"/>
<TextView
android:id="@+id/tixian_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp10"
android:layout_marginRight="@dimen/dp10"
android:drawableLeft="@drawable/wthdrawals_icon"
android:gravity="center_vertical"
android:text=" 提现"
android:textColor="@color/white"
android:textSize="@dimen/sp13"/>
<TextView
android:id="@+id/tixian_back"
android:layout_width="70dp"
android:layout_height="25dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp10"
android:background="@drawable/withdrawals_text_shape"
android:textColor="@color/my_photo_recycler_divider"
android:textSize="@dimen/sp13"/>
</RelativeLayout>
withdrawals_text_shape:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#40ffffff"/>
<corners
android:bottomLeftRadius="13dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="13dp"
android:topRightRadius="0dp"/>
</shape>
<color name="my_photo_recycler_divider">#dddddd</color>