style: 替换全局展开/收起图标并微调 padding
将 ic_new_expand 替换为线条更简洁的 ic_new_expand_1, 同时把按钮内边距从 4dp 调整为 2dp,让图标在 36dp 容器内更舒展。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="1408dp"
|
|
||||||
android:height="1024dp"
|
|
||||||
android:viewportWidth="1408"
|
|
||||||
android:viewportHeight="1024">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:fillColor="#599dff"
|
|
||||||
android:pathData="M1327.05296 200.971963H427.464174c-38.280374 0-76.560748-38.280374-76.560747-76.560748s31.900312-76.560748 76.560747-76.560748h899.588786c38.280374 0 76.560748 38.280374 76.560747 76.560748s-31.900312 76.560748-76.560747 76.560748zM669.906542 519.975078v-12.760125c-6.380062-19.140187-12.760125-31.900312-25.520249-44.660436l-25.520249-25.520249h708.186916c44.660436 0 76.560748 31.900312 76.560747 76.560748s-31.900312 76.560748-76.560747 76.560747H618.866044l25.520249-25.520249c12.760125-12.760125 19.140187-25.520249 25.520249-44.660436zM350.903427 513.595016L25.520249 169.071651C12.760125 149.931464 0 130.791277 0 98.890966s12.760125-51.040498 25.520249-70.180686c38.280374-38.280374 95.700935-38.280374 133.981309 0l382.803738 401.943926 25.520249 25.520249c12.760125 12.760125 19.140187 25.520249 25.520249 44.660436V513.595016c-6.380062 25.520249-12.760125 38.280374-25.520249 51.040498L542.305296 590.155763 159.501558 992.099688c-19.140187 19.140187-44.660436 31.900312-63.800623 31.900312-25.520249 0-51.040498-12.760125-63.800623-31.900312-19.140187-12.760125-31.900312-38.280374-31.900312-63.800623s12.760125-51.040498 25.520249-70.180685L350.903427 513.595016z m76.560747 312.623053h899.588786c38.280374 0 76.560748 38.280374 76.560747 76.560747s-31.900312 76.560748-76.560747 76.560748H427.464174c-38.280374 0-76.560748-38.280374-76.560747-76.560748s38.280374-76.560748 76.560747-76.560747z" />
|
|
||||||
</vector>
|
|
||||||
24
module_base/src/main/res/drawable/ic_new_expand_1.xml
Normal file
24
module_base/src/main/res/drawable/ic_new_expand_1.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<!--
|
||||||
|
~ Copyright (C) 2026 The Android Open Source Project
|
||||||
|
~
|
||||||
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
~ you may not use this file except in compliance with the License.
|
||||||
|
~ You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing, software
|
||||||
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
~ See the License for the specific language governing permissions and
|
||||||
|
~ limitations under the License.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="256dp"
|
||||||
|
android:height="256dp"
|
||||||
|
android:viewportWidth="1024"
|
||||||
|
android:viewportHeight="1024">
|
||||||
|
<path
|
||||||
|
android:pathData="M512,896l320,-320L192,576zM512,128l320,320L192,448z"
|
||||||
|
android:fillColor="#1c8cf5"/>
|
||||||
|
</vector>
|
||||||
@@ -101,9 +101,9 @@
|
|||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
||||||
android:padding="4dp"
|
android:padding="2dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
|
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
|
||||||
android:contentDescription="展开/收起全部子列表" />
|
android:contentDescription="展开/收起全部子列表" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -108,13 +108,13 @@
|
|||||||
|
|
||||||
<!-- 全局展开/收起按钮 -->
|
<!-- 全局展开/收起按钮 -->
|
||||||
<ImageView
|
<ImageView
|
||||||
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
|
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:contentDescription="展开/收起全部子列表"
|
android:contentDescription="展开/收起全部子列表"
|
||||||
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
||||||
android:padding="4dp"
|
android:padding="2dp"
|
||||||
android:scaleType="fitCenter" />
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -102,9 +102,9 @@
|
|||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
||||||
android:padding="4dp"
|
android:padding="2dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
|
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
|
||||||
android:contentDescription="展开/收起全部子列表" />
|
android:contentDescription="展开/收起全部子列表" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -99,8 +99,8 @@
|
|||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
||||||
android:padding="4dp"
|
android:padding="2dp"
|
||||||
android:src="@drawable/ic_new_expand" />
|
android:src="@drawable/ic_new_expand_1" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -130,8 +130,8 @@
|
|||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
||||||
android:padding="4dp"
|
android:padding="2dp"
|
||||||
android:src="@drawable/ic_new_expand" />
|
android:src="@drawable/ic_new_expand_1" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -108,13 +108,13 @@
|
|||||||
|
|
||||||
<!-- 全局展开/收起按钮 -->
|
<!-- 全局展开/收起按钮 -->
|
||||||
<ImageView
|
<ImageView
|
||||||
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
|
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:contentDescription="展开/收起全部子列表"
|
android:contentDescription="展开/收起全部子列表"
|
||||||
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
||||||
android:padding="4dp"
|
android:padding="2dp"
|
||||||
android:scaleType="fitCenter" />
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user