Background Image Size overrides all size settings
See original GitHub issueI think in no near future there will be any competitors for this library… Saw huge projects that are using this amazing job as their backbone.
I have three issues and would be thankful if you could take a look into.
- When I set background image, image size overrides all size settings and thereafter, the only way to resize the gauge is to resize the image in an external software. Is that how it is meant to be or I’m doing sth wrong?
gauge.setBackgroundResource(R.drawable.dial);
<com.github.anastr.speedviewlib.ImageSpeedometer
android:id="@+id/speedView"
android:layout_width="50dp"
android:layout_height="50dp"
app:sv_centerCircleColor="@android:color/transparent"/>
-
As you can see in the image, when I set tick texts and use padding to bring the text more to center and turn rotation off, text is ununiformly spaced from center and needs some padding to shift tick texts up. It is probably because of turned off rotation. By the way it causes a minor aesthetic issue.
-
Again, as you can see in the image, When choosing different sizes for
setSpeedTextSize
&setUnitTextSize
there is some alignment issue. Is there any workarounds?
Thanks again for the great job and the effort you put to maintain it.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Resizing background images with background-size - CSS
The background-size CSS property lets you resize the background image of an element, overriding the default behavior of tiling the image at ...
Read more >html - background overwrites background-size - Stack Overflow
As I understand it this is because the background shorthand implicitly sets ALL the properties it represents, not just the ones you specify,...
Read more >Perfect Full Page Background Image - CSS-Tricks
We set a fixed and centered background on it, then adjust it's size using background-size set to the cover keyword. Works in: Safari...
Read more >A Deep Dive Into object-fit And background-size In CSS
The object-fit property defines how the content of a replaced element such as img or video should be resized to fit its container....
Read more >how do i control the size of the background image?
There's a CSS3 property ('background-size') for sizing background images. SharePoint adds the background image class '.ms-backgroundImage' ...
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
It’s not posable to fix this programmatically, it’s about the font and parentheses style. For example if we write here ‘(A)’ you’ll notice the same vertical alignment.
Hello @AKTanara I’m happy to see people contented with my library. I’ll point out some of my answers.
ImageSpeedometers
is added to avoid drawing too many shapes directly on thecanvas
- which costs GPU and memory -. Adding images to other speedometers does make no sense, drawing stuff on top of an image is an unpredictable process and it may consume the main thread.sv_speedTextTypeface
attribute in this demo file to see what does it mean, the font file exists in the assets folder.