搜索框改成圆角

pull/159/head
yangyxd 5 years ago
parent de6500208c
commit 684c2dd4d4
  1. 9
      app/src/main/res/drawable/bg_searchview.xml
  2. 9
      app/src/main/res/layout/view_search.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 角度 -->
<corners android:radius="35dp"/>
<!-- 填充色 -->
<solid android:color="@color/background_menu"/>
<!-- 描边 设置线宽及颜色 -->
<stroke android:color="@color/background_menu" android:width="0.5dp"/>
</shape>

@ -3,8 +3,13 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/search_view"
android:layout_width="match_parent"
android:theme="?attr/actionBarStyle"
android:layout_height="wrap_content"
android:background="@drawable/bg_searchview"
android:layout_width="match_parent"
android:layout_height="34dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:imeOptions="actionSearch"
app:queryBackground="@drawable/bg_searchview"
app:submitBackground="@color/transparent"
app:defaultQueryHint="搜索"/>
Loading…
Cancel
Save