效果图
方法一:
<SearchView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="96dp"
android:background="@drawable/shape"/>放大镜的布局
shape布局
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="20dp"/>
<stroke android:width="1dp"
android:color="#bcb8b8"/>
<size android:width="300dp"
/>
</shape>
方法二:
利用SV