CircleProgress icon indicating copy to clipboard operation
CircleProgress copied to clipboard

Bottom Text not appearing properly

Open aritraroy opened this issue 8 years ago • 1 comments

screenshot_20160919-152502

Almost everything works fine for me, except that the bottom text is always cut out and is not visible fully. This makes the library nearly unusable in production. I really liked the library and want to use it in production.

This how my XML looks,

<com.github.lzyzsd.circleprogress.ArcProgress
                    android:id="@+id/bandwidth_progress"
                    android:layout_width="140dp"
                    android:layout_height="140dp"
                    custom:arc_bottom_text="@string/label_bandwidth_caps"
                    custom:arc_finished_color="@color/white"
                    custom:arc_progress="55"
                    custom:arc_suffix_text_padding="12dp"
                    custom:arc_suffix_text_size="16sp"
                    custom:arc_text_color="@color/white"
                    custom:arc_text_size="52sp"
                    custom:arc_unfinished_color="@color/primary_dark" />

Please let me know what am I doing wrong here? If there is a bug in the library, can it be fixed anytime soon?

aritraroy avatar Sep 19 '16 19:09 aritraroy

line 269
float radius = width / 2f; may be can be modified float radius = (width - strokeWidth)/2;

the same to line 298

the real question is arcBottomHeight + textHeight/2 beyond the view's bottom.

ivotai avatar Nov 01 '16 12:11 ivotai