Skip to content

Commit f950e2c

Browse files
update compose version to 1.3.1
1 parent facf34d commit f950e2c

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

app/src/main/java/com/smarttoolfactory/composeratingbar/MainActivity.kt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,32 @@ private fun RatingbarDemo() {
136136
shimmer = Shimmer(
137137
color = pink500,
138138
animationSpec = infiniteRepeatable(
139-
animation = tween(durationMillis = 1000, easing = LinearEasing),
139+
animation = tween(durationMillis = 2000, easing = LinearEasing),
140140
repeatMode = RepeatMode.Reverse
141141
)
142142
),
143143
tintEmpty = pink500,
144+
tintFilled = pink500,
145+
itemSize = 40.dp
146+
) {
147+
rating4 = it
148+
}
149+
150+
RatingBar(
151+
rating = rating4,
152+
space = 2.dp,
153+
imageVectorEmpty = Icons.Default.FavoriteBorder,
154+
imageVectorFFilled = Icons.Default.Favorite,
155+
shimmer = Shimmer(
156+
color = pink500,
157+
animationSpec = infiniteRepeatable(
158+
animation = tween(durationMillis = 2000, easing = LinearEasing),
159+
repeatMode = RepeatMode.Restart
160+
),
161+
drawBorder = true
162+
),
163+
tintEmpty = pink500,
164+
tintFilled = pink500,
144165
itemSize = 40.dp
145166
) {
146167
rating4 = it

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
ext {
3-
compose_version = '1.3.0-rc01'
3+
compose_version = '1.3.1'
44
}
55
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
66
plugins {
7-
id 'com.android.application' version '7.3.0' apply false
8-
id 'com.android.library' version '7.3.0' apply false
7+
id 'com.android.application' version '7.3.1' apply false
8+
id 'com.android.library' version '7.3.1' apply false
99
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
1010
}
1111

ratingbar/src/main/java/com/smarttoolfactory/ratingbar/model/Shimmer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ data class Shimmer(
6060
)
6161
}
6262
}
63-
}
63+
}

0 commit comments

Comments
 (0)