Value is not centered vertically
See original GitHub issueI 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:
- Created 8 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 😃
why there is no left or right value, I means if I just want the unit center vertical ,what should I do?