rating bar becomes to large and is cut-off when adding custom images in android

前端 未结 2 465
一生所求
一生所求 2020-12-12 07:40

I followed an answer on stack overflow to adding a custom rating bar to an android project, here it is: https://stackoverflow.com/a/32828726/5909396

Just in case I a

相关标签:
2条回答
  • 2020-12-12 08:34

    set

    android:layout_width="wrap_content"
    android:layout_height="0dp"
    
    0 讨论(0)
  • 2020-12-12 08:39

    I made a library with a customizable rating bar. You can set full and empty icon and their size. I hope this helps you.

    This is an example of the usage, is very simple:

    <com.kabuki5.logicalratingbar.CustomRatingBar
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:clickable="true"
            app:iconSize="58dp"
            app:imageEmpty="@drawable/ic_heart_empty"
            app:imageFull="@drawable/ic_heart_full"
            app:initRating="5"
            app:maxItems="5" />
    

    Also you can set a listener to get on change value callback.

    Logical Rating Bar

    0 讨论(0)
提交回复
热议问题