Android Question 1 pixel line by a panel

peacemaker

Expert
Licensed User
Longtime User
By art design it needs to make horozontal lines on activities.
I'm trying to use just a colored panel with colored border, the height = 1 pixel, alfa = 255, sure.

Trouble is that such 1 pixel height panel sometimes is not visible after compilation on some devices with Android 6\7. In Android 4.x - no problem, lines are visible.
2 pixel panel is OK everywhere.
In one of emulators on a one activity - one 1px panel is invisible, but 2 others - visible !
Why can it be?

How 1px lines can be made moveable, by some other view ?
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
But height is set only by the Designer, static.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Ohhhh, no, did not try by code - it's lot of such panels, without special names and loading by UltimateListView where each view should be got from each item panel :(
Will try by the designer code...

UPD: if to set the height by the designer code - 2dip is set OK and well visible. But 1dip is not visible anyway.
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
HA ! Designer's scripting .Height = 1.5dip made the trick !
But the designer itself does not support float :-( to set it static by copy\paste.
 
Last edited:
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
You can use the designer script feature to set the value in a code like way
 
Upvote 0
Top