Open MarkOSullivan94 opened 7 years ago
You have to do something like float decoViewLineWidth = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 15, Resources.getSystem().getDisplayMetrics());
so that you're working with dp not pixels - in this example 15dp is the line width
@nocturne9op2 tried out your suggestion but this still doesn't look great when scaling. I've taken screenshots when using an emulated Nexus 10 and an emulated Pixel.
I think there'll be complications whenever doing a layout for tablets as you can only specify the line width programmatically
I see, I ran into some DecoView proportion issues as well while I was finishing my app. A way around this is to set a different line width for tablets. Android recommends using different xml layouts to suit different screen sizes anyway.
Android recommends using different xml layouts to suit different screen sizes anyway.
@nocturne9op2 unfortunately the line width cannot be specified within the XML layouts. If that was the case, it would have made it a lot easier using this library for all different screen sizes.
You should be able to programmatically check whether the device is a phone or tablet, then set the line width accordingly.
I've noticed a problem when comparing the charts on different screen sizes. While the line width might look perfect on one phone, if you use a phone with a smaller screen size the line width looks too thick.