fix(home): 修正搜索栏布局及Tab样式细节
搜索框从EditText改为TextView入口,搜索按钮改为主题色圆角按钮, Tab文字颜色统一引用子Tab专用选择器,drawable颜色引用修正为主题色。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
f5be575491
commit
bb23c00e9c
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 选中状态-->
|
||||
<item android:drawable="@drawable/bg_white_background_shap" android:state_checked="true"/>
|
||||
<item android:drawable="@drawable/bg_white_background_shap" android:state_selected="true"/>
|
||||
<item android:drawable="@color/theme_color" android:state_checked="true"/>
|
||||
<item android:drawable="@color/theme_color" android:state_selected="true"/>
|
||||
<!-- 默认状态-->
|
||||
<item android:drawable="@drawable/bg_action_grey_radius5"/>
|
||||
<item android:drawable="@color/text_black_60"/>
|
||||
</selector>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="?attr/colorPrimary" />
|
||||
<solid android:color="@color/theme_color" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
@@ -7,52 +8,51 @@
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginRight="10dp"
|
||||
<RelativeLayout
|
||||
android:id="@+id/custom_ll_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_18"
|
||||
android:layout_toLeftOf="@+id/custom_search_tv"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/bg_search_shap_radius23">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:src="@mipmap/ic_search" />
|
||||
|
||||
<EditText
|
||||
<TextView
|
||||
android:id="@+id/custom_search_et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:background="@null"
|
||||
android:longClickable="false"
|
||||
android:layout_marginLeft="@dimen/dp_38"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/search_hint"
|
||||
android:text="请输入关键字进行搜索"
|
||||
android:longClickable="false"
|
||||
android:maxLines="1"
|
||||
android:imeOptions="actionSearch"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_black_66"
|
||||
android:textColorHint="@color/text_black_99"
|
||||
android:textColor="#B6B6B6"
|
||||
android:textSize="@dimen/txt13" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/custom_search_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_22"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:text="@string/search_submit"
|
||||
android:textColor="@color/text_black_99"
|
||||
android:textSize="@dimen/txt13" />
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:id="@+id/custom_search_tv"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="@string/search_submit"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/txt14"
|
||||
app:shapeCornersRadius="14dp"
|
||||
app:shapeSolidColor="@color/theme_color" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
android:id="@+id/tv_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingHorizontal="6dp"
|
||||
android:paddingVertical="7dp"
|
||||
android:textColor="@color/color_tab_layout_text_theme"
|
||||
android:textSize="16sp" />
|
||||
android:textColor="@color/color_child_tab_layout_text_index_theme"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/tv_line"
|
||||
@@ -22,4 +23,4 @@
|
||||
android:layout_below="@+id/tv_text"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_child_tab_layout_item_line" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
Reference in New Issue
Block a user