Androidplot legend icon shows differently on different devices - android

I am using AndroidPlot in my project and am trying to figure out why the same code leads to a different legend design on two phones.
On one phone the legend shows the line inside a black box, which makes it hard to see, on another phone I get a nice box in the line colour, which is the behaviour I want.
Screenshot showing two legends side by side
Please ignore the overlapping legend text in the screenshot, that's the next problem I need to fix.

Related

Android Printing Custom Layout

I have a custom layout with a border for a receipt to be printed on A5 paper. I m able to get it to work but i m facing one strange issue for the text view which has borders only on the left and bottom side. As everybody uses, i have also used layer drawable as a background. On-screen it is displaying correctly i.e. have a border in the bottom and left. But in print out, i m getting a thin line on the top and right side of the view as well.
Adding screenshots for on-screen view and printed pdf.
How to set the text view border so i do not get thin lines on other sides where i have not set the border?

Hairline borders between my tables in Gmail Android App (Android 5-6)

I am going crazy trying to figure out why this happening. I have hairline borders appearing between my tables in my Gmail App on Android 5-6 on a email template i'm working on for a client. This doesnt appear in any other client but the gmail app. The weird thing is, when I zoom in the hairlines disappear on a specific zoom level.
The hairlines are very light but you can see them in the screenshot
I have border-collapse:collapse on all tables with cellpadding, cellspacing, border and border-spacing all set to 0.
Any assistance or input anyone could have would be really appreciated.
Try putting the outer table background color to white and if doesnt work then all td's border and background color to white. This used to happen in iOS when you use different background colors.

Cannot see what is in design preview on android studio?

This is how Android Studio looks for me:
When I pick a number text and put it on a blue screen, I cannot see it to edit it. Why is that?
At the very top where it says Pixel XL (to the left of it). To the right of the refresh icon.
You have 3 different boxes. The box in the middle is all blue, see it? great. Click on the box on the left that has zero blue. What do you get now?

How to remove left Range panel in androidplot?

I'm trying to get the graph view horizontally centered inside my layout, but I'm not able to "remove" that left bar, which is actually where the "range" settings are.
This is a screenshot from the official demo app, showing this undesired effect which I'm also getting on my app.
Any ideas how to completely remove this?
Try:
plot.getGraphWidget().setMarginLeft(0);
That should actually get rid of everything on the left including the area where the range labels are currently being drawn so you may need to play with it to find the value that looks good with your range values / range font configuration.
Nick

Roboto inconsistent font height

I'm currently facing strange problems with Android's font Roboto. At first I had two TextViews in one horizontal LinearLayout, centered both vertically and horizontally. The first TextView was set font Roboto-Black.ttf and the second was Roboto-Light.ttf. Both was set to textSize="12sp", but the one with Roboto-Light.ttf was just a pixel higher then the Roboto-Black.ttf TextView. But it didn't happen when I've set textSize="13sp". So I've created new Android project, just to be sure it's not only in the one application. The result is almost identical, but in this case, textSize="12sp" works as expected but textSize="13sp" doesn't. I've made screenshots to show the issue.
12sp works as expected. Top edges align.
13sp has this strange behavior.
Strange is, that this happens only when I try to mix thin and thick lined variants. When I make one TextView Roboto-Bold.ttf and second Roboto-Black.ttf, result is good. When I try Roboto-Light.ttf and Roboto-Thin.ttf, it also work properly.
So I also tried to test this in photoshop and this is what I found:
It's the same for all fonts from Roboto family, except for the Roboto-Light.ttf. I can also post source code for the layout if needed.
Thanks in advance.
PS: I'm sorry for the links but due to low reputation (brand new account) I can't post images. Also in the last link i had to remove the "h" from "http", because it didn't allow me more than two links.
I can't tell you if its the fonts or how your phone interprets the fonts and displays them on the screen but I can tell you that I've had issues with centering views in the middle before.
Have you tried using a relativelayout and then align the second textviews top and bot with the first textview? That might solve the problem.

Categories

Resources