[add] 自定义ratingbar

This commit is contained in:
liujing
2020-10-16 18:51:23 +08:00
parent 5f341ff6ad
commit 3e1c8afbca
6 changed files with 343 additions and 12 deletions

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/customRatingBar">
</RelativeLayout>

View File

@@ -1054,8 +1054,8 @@
<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">36px</dimen>
<dimen name="heart_ratingbar_height">30px</dimen>
<dimen name="heart_ratingbar_width">40px</dimen>
<dimen name="heart_ratingbar_height">43px</dimen>
<dimen name="v2x_panel_loading_top">300px</dimen>
<dimen name="v2x_share_btn_width">281px</dimen>
<dimen name="v2x_share_btn_height">90px</dimen>

View File

@@ -8,9 +8,36 @@
</declare-styleable>
<declare-styleable name="CustomCircleImageView">
<attr format="dimension" name="civ_border_width"/>
<attr format="color" name="civ_border_color"/>
<attr format="boolean" name="civ_border_overlay"/>
<attr format="color" name="civ_fill_color"/>
<attr name="civ_border_width" format="dimension" />
<attr name="civ_border_color" format="color" />
<attr name="civ_border_overlay" format="boolean" />
<attr name="civ_fill_color" format="color" />
</declare-styleable>
<declare-styleable name="CustomRatingBar">
<!---->
<attr name="elenmentWidth" format="dimension" />
<!---->
<attr name="elenmentHeight" format="dimension" />
<!--单元间距-->
<attr name="elenmentPadding" format="dimension" />
<!--单元总数-->
<attr name="elenmentCount" format="integer" />
<!--空资源-->
<attr name="elenmentEmpty" format="reference" />
<!--满资源-->
<attr name="elenmentFill" format="reference" />
<!--半资源-->
<attr name="elenmentHarf" format="reference" />
<!--是否可点击-->
<attr name="clickable" format="boolean" />
<!--当前进度-->
<attr name="elenmentStep" format="float" />
<!--进度方式 半个还是整个-->
<attr name="stepSize">
<enum name="Half" value="0" />
<enum name="Full" value="1" />
</attr>
</declare-styleable>
</resources>