question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Value is not centered vertically

See original GitHub issue

I can’t manage to get my value centered vertically in the progress bar. The value seems to have its pivot at the top. So, when it grows (through auto text size or manual size) its top is aligened to the middle of the progressbar center and it grows towards the half bottom part of the progress bar. I can upload pictures if needed.

xml code:

<at.grabner.circleprogress.CircleProgressView
                android:id="@+id/circleView"
                android:layout_width="100"
                android:layout_height="100"
                android:layout_centerInParent="true"

                app:cpv_value="10"
                app:cpv_maxValue="100"
                app:cpv_barColor="@color/main_screen_progressbar_rim_fg_color"
                app:cpv_rimColor="@color/main_screen_progressbar_rim_bg_color"
                app:cpv_textColor="#FFFFFF"
                app:cpv_unitColor="#FFFFFF"
                app:cpv_spinColor="@color/main_screen_progressbar_rim_fg_color"
                app:cpv_barWidth="10dp"
                app:cpv_rimWidth="10dp"
                app:cpv_contourSize="0dp"
                app:cpv_autoTextSize="true"
                app:cpv_seekMode="true"
                app:cpv_unit="%"
                app:cpv_unitPosition="right_bottom"
                app:cpv_unitScale="1"
                app:cpv_textScale="1"
                app:cpv_showUnit="true"/>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jakob-grabnercommented, Dec 3, 2015

Hi, first thanks for using my library. This is what i thought. For some reason the preview in Android Studio is not correct. I once debugged it and it turned out that the measure text function does not return correct results in the preview in android studio. I’m afraid there is nothing i can do about this. But as you figured out, it’s fine on the device 😃

0reactions
ethanleeXcommented, Dec 7, 2016

why there is no left or right value, I means if I just want the unit center vertical ,what should I do?

Read more comments on GitHub >

github_iconTop Results From Across the Web

vertical-align - CSS: Cascading Style Sheets - MDN Web Docs
The vertical-align property can be used in two contexts: To vertically align an inline element's box inside its containing line box.
Read more >
How to Vertically Center Text with CSS - W3Docs
To position text vertically positioned with CSS you can use vertical-align, line-height, transform properties, flexbox. Learn more methods. Try examples.
Read more >
Why is vertical-align: middle not working on my span or div?
To vertically center a span or div element within another div, add position relative to parent div and position absolute to ...
Read more >
Understanding vertical-align, or "How (Not) To ... - Phrogz.net
This question is often followed by I'm using vertical-align:middle but it's not working! The problem here is three-fold: HTML layout traditionally was not...
Read more >
CSS Vertical Align – How to Center a Div, Text, or an Image ...
CSS can be tricky to work with. For example, if you're trying to align something horizontally OR vertically, it's not that difficult. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found