修改名称。
This commit is contained in:
20
MainModule/src/main/res/drawable/tab_indicator_bottom.xml
Normal file
20
MainModule/src/main/res/drawable/tab_indicator_bottom.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 用item标签限制整体尺寸:maxWidth=100dp,height=10dp(与tabIndicatorHeight一致) -->
|
||||
<item
|
||||
android:height="@dimen/dp_6"
|
||||
android:gravity="center"
|
||||
android:maxWidth="@dimen/dp_40">
|
||||
<!-- 最大宽度(根据需求调整) -->
|
||||
<!-- 固定高度(与tabIndicatorHeight匹配) -->
|
||||
<!-- 图片在item内居中 -->
|
||||
<!-- 嵌套bitmap设置图片资源和缩放模式 -->
|
||||
<bitmap
|
||||
android:dither="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/tab_x" />
|
||||
<!-- 你的图片资源 -->
|
||||
<!-- 等比例缩放,确保图片在maxWidth和height内完整显示 -->
|
||||
<!-- 抗锯齿优化 -->
|
||||
</item>
|
||||
</layer-list>
|
||||
Reference in New Issue
Block a user