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

View File

@@ -2,15 +2,15 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@android:id/background"
android:drawable="@drawable/icon_enthusiasm_unchoose">
android:drawable="@drawable/icon_heart_unchoose">
</item>
<item
android:id="@android:id/secondaryProgress"
android:drawable="@drawable/icon_enthusiasm_second">
android:drawable="@drawable/icon_heart_second">
</item>
<item
android:id="@android:id/progress"
android:drawable="@drawable/icon_enthusiasm_choose">
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>

View File

@@ -107,7 +107,7 @@
<RatingBar
android:id="@+id/rating_bar"
style="@style/customRatingBarStyle"
style="@style/customHeartHeartRatingBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="true" />

View File

@@ -61,8 +61,7 @@
<dimen name="module_v2x_surrounding_top_textsize">18px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_des_index_width">17px</dimen>
<dimen name="module_v2x_des_index_height">14px</dimen>
<dimen name="module_v2x_panel_width">82px</dimen>
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
<dimen name="share_empty_icon_width">117px</dimen>

View File

@@ -58,8 +58,6 @@
<dimen name="module_v2x_surrounding_top_textsize">32px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">36px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">30px</dimen>
<dimen name="module_v2x_des_index_width">16px</dimen>
<dimen name="module_v2x_des_index_height">42px</dimen>
<dimen name="module_v2x_panel_width">120px</dimen>
<dimen name="module_v2x_panel_tab_height">158px</dimen>

View File

@@ -59,8 +59,7 @@
<dimen name="module_v2x_surrounding_top_textsize">32px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">36px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">30px</dimen>
<dimen name="module_v2x_des_index_width">31.9px</dimen>
<dimen name="module_v2x_des_index_height">26px</dimen>
<dimen name="module_v2x_panel_icon_cor">30px</dimen>
<dimen name="module_v2x_panel_width">140px</dimen>
<dimen name="share_empty_icon_width">219px</dimen>

View File

@@ -57,8 +57,6 @@
<dimen name="module_v2x_surrounding_top_textsize">18px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_des_index_width">16px</dimen>
<dimen name="module_v2x_des_index_height">20px</dimen>
<dimen name="module_v2x_panel_width">82px</dimen>
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
<dimen name="share_empty_icon_width">117px</dimen>

View File

@@ -4,17 +4,6 @@
<attr name="roundLayoutRadius" format="dimension" />
</declare-styleable>
<style name="customRatingBarStyle" parent="@style/Widget.AppCompat.RatingBar">
<item name="android:minHeight">@dimen/module_v2x_des_index_height</item>
<item name="android:maxHeight">@dimen/module_v2x_des_index_height</item>
<item name="android:maxWidth">@dimen/module_v2x_des_index_width</item>
<item name="android:minWidth">@dimen/module_v2x_des_index_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/share_rating_bar</item>
</style>
<style name="customTabLayoutTextAppearance" parent="TextAppearance.Design.Tab">
<item name="android:textSize">@dimen/dp_40</item>
</style>