Android Question EditText problems with certain display

Fabio Campanella

Member
Licensed User
Longtime User
Hi, I've an issue with some little EditText (my customer would like this) with certain displays.

With most of the displays this little EditText looks good but with some you see it as in the picture.

How can I fix the problem?

Thanks at all for your help!!
 

Attachments

  • a.jpg
    a.jpg
    113.4 KB · Views: 193

eps

Expert
Licensed User
Longtime User
What's the code that displays those controls?

I think I know what your problem is, but can you show a screenshot of something which is correct/working alongside the one that doesn't please.
 
Upvote 0

Fabio Campanella

Member
Licensed User
Longtime User
@tigrot: This is a Number EditText, It should look like a 0, in fact you just see its lower part

@eps: this is my code, i add the control programmatically, this code work correctly in most of the display, but not ad es in the p8 lite display :(

B4X:
   Dim cd As ColorDrawable
   cd.Initialize2(Colors.RGB(124,177,193),6,0,Colors.RGB(124,177,193))
  
   txQtaCoupon.Initialize("txQtaCoupon")
   txQtaCoupon.Background = cd
   txQtaCoupon.TextSize = 13
   txQtaCoupon.TextColor = Colors.Black
   txQtaCoupon.Gravity = Gravity.BOTTOM + Gravity.RIGHT
   txQtaCoupon.InputType = txPunti.INPUT_TYPE_NUMBERS
   txQtaCoupon.Text = "0"

In this picture there left side (p8 lite) and right side Galaxy S6 Edge
 

Attachments

  • a.jpg
    a.jpg
    235.1 KB · Views: 187
Upvote 0

Fabio Campanella

Member
Licensed User
Longtime User
code for that please

The previous code is called in the Initialize method from a class that contain entire blue-panel where are this EditText Controls

in the activity I call this:

B4X:
   Dim key As String = "K" & Utility.GenerateGuid
   Dim oCL As CLPannelloCouponPunti ' This is the class that contain blue-panel and edittext controls
   oCL.Initialize(Me, "oCL", key)   ' Initialize (here is executed the previous code in the previous post)
   lvCouponsPunti.Add(oCL.GetPanel, CLU.RDY(100dip), key) ' The panel is put in the CustomListView
   PannelliPunti.Put(key, oCL) ' Map that contain the pointers of the class
 
Upvote 0
Top