ratingbar->commons

This commit is contained in:
liujing
2020-09-22 19:28:38 +08:00
parent 8dbc6b8b07
commit 083da0a7c1
21 changed files with 36 additions and 23 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@android:id/background"
android:drawable="@drawable/icon_heart_unchoose">
</item>
<item
android:id="@android:id/secondaryProgress"
android:drawable="@drawable/icon_heart_second">
</item>
<item
android:id="@android:id/progress"
android:drawable="@drawable/icon_heart_choose">
</item>
</layer-list>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="heart_ratingbar_width">17px</dimen>
<dimen name="heart_ratingbar_height">14px</dimen>
</resources>

View File

@@ -1054,5 +1054,7 @@
<dimen name="sp_48">48px</dimen>
<dimen name="module_common_shadow_width">-10px</dimen>
<dimen name="module_common_shadow_width_pos">10px</dimen>
<dimen name="heart_ratingbar_width">31.9px</dimen>
<dimen name="heart_ratingbar_height">26px</dimen>
</resources>

View File

@@ -1045,4 +1045,6 @@
<dimen name="sp_48">26.2500px</dimen>
<dimen name="module_common_shadow_width">-8px</dimen>
<dimen name="module_common_shadow_width_pos">8px</dimen>
<dimen name="heart_ratingbar_width">16px</dimen>
<dimen name="heart_ratingbar_height">20px</dimen>
</resources>

View File

@@ -14,4 +14,19 @@
<item name="android:topDark">@android:color/transparent</item>
<item name="android:borderlessButtonStyle">@android:color/transparent</item>
</style>
<style name="customHeartHeartRatingBarStyle" parent="@style/Widget.AppCompat.RatingBar">
<item name="android:minHeight">@dimen/heart_ratingbar_height</item>
<item name="android:maxHeight">@dimen/heart_ratingbar_height</item>
<item name="android:maxWidth">@dimen/heart_ratingbar_width</item>
<item name="android:minWidth">@dimen/heart_ratingbar_width</item>
<item name="android:numStars">5</item>
<item name="android:rating">1</item>
<item name="android:stepSize">0.5</item>
<item name="android:progressDrawable">@drawable/module_commons_heart_ratingbar_drawable</item>
</style>
</resources>