Skip to content

Commit 746889c

Browse files
committed
v2.0.4
1 parent 5468e1b commit 746889c

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ allprojects {
2222
# module build.gralde
2323
dependencies {
2424
...
25-
implementation 'com.github.mengxn:dotview:2.0.0' // 不向下兼容1.X.X
25+
implementation 'com.github.mengxn:dotview:2.0.4' // 不向下兼容1.X.X
2626
}
2727
```
2828

@@ -51,12 +51,15 @@ dotRadius:圆点半径值
5151
<me.codego.view.DotLayout
5252
android:layout_width="wrap_content"
5353
android:layout_height="wrap_content"
54+
app:dotMarginEnd="-5dp"
55+
app:dotMarginTop="-5dp"
5456
app:dotPaddingHorizontal="5dp"
5557
app:dotPaddingVertical="3dp"
5658
app:dotRadius="3dp"
5759
app:dotColor="#f00"
5860
app:dotTextColor="#FFF"
59-
app:dotTextSize="10sp" >
61+
app:dotTextSize="10sp"
62+
app:dotType="plus" >
6063

6164
<ImageView
6265
android:layout_width="wrap_content"
@@ -69,8 +72,11 @@ dotTextColor:圆点前景色,即数字显示颜色
6972
dotTextSize:字号大小
7073
dotRadius:圆点半径值
7174
dotPaddingHorizontal:圆点前后padding
72-
dotPaddingVertical:圆点上下padding
73-
dotLocation:圆点位置:left:左侧;right:右侧
75+
dotPaddingVertical:圆点上下padding
76+
dotMarginTop: 圆点上margin值
77+
dotMarginEnd: 圆点右margin值
78+
dotLocation:圆点位置:left:左侧;right:右侧
79+
dotType: 圆点数字超限显示方式: normal:不限制;ellipsis:省略号形式;plus:99+形式
7480

7581
2. 调用代码进行展示
7682
- 仅显示提示

app/src/main/res/layout/activity_main.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@
135135

136136
<me.codego.view.DotLayout
137137
android:id="@+id/dot_layout_5"
138-
android:layout_width="60dp"
139-
android:layout_height="60dp"
138+
android:layout_width="wrap_content"
139+
android:layout_height="wrap_content"
140140
android:layout_marginStart="10dp"
141141
android:layout_marginLeft="10dp"
142+
android:padding="5dp"
142143
app:dotMarginEnd="-5dp"
143144
app:dotMarginTop="-5dp"
144145
app:dotPaddingHorizontal="5dp"
@@ -149,7 +150,6 @@
149150
<TextView
150151
android:layout_width="40dp"
151152
android:layout_height="40dp"
152-
android:layout_gravity="center"
153153
android:background="#ff0" />
154154
</me.codego.view.DotLayout>
155155

dot-view/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdk 14
99
targetSdk 30
10-
versionCode 203
11-
versionName "2.0.3"
10+
versionCode 204
11+
versionName "2.0.4"
1212

1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414

image/demo.png

-707 Bytes
Loading

0 commit comments

Comments
 (0)