Bug? Padding has changed on Text Edit fields in Lollipop

RVP

Active Member
Licensed User
Longtime User
Client I did a custom app for called as they had some of their users update their phones (Samsung Galaxy Note 3) to Lollipop. This caused a number of issues, one of them being that it appears the padding around the text has increased. This is causing the text to get cut-off at either the top, or bottom, depending on the alignment. I had to reduce the font size significantly in some cases to get the text to display properly again. This isn't really long term solution as I need the larger size for readability. Is there anyway to change the padding? I have added
B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
to the manifest, but that didn't seem to make any difference.
 

klaus

Expert
Licensed User
Longtime User
To set the padding, have a look at ViewUtils in Code Snippets.
B4X:
'Sets the padding of a view
'v = view
'Left, Top, Right, Bottom padding values in pixels
Sub setPadding(v As View, Left As Int, Top As Int, Right As Int, Bottom As Int)
    Dim jo = v As JavaObject
    jo.RunMethod("setPadding", Array As Object(Left, Top, Right, Bottom))
End Sub
 
Top