Android Question Panel in CustomListView not roundable

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone, as always on Android the "UI problems" are more than iOS...
I filled a CLV with this code

B4X:
    For Each p As Map In pasti
        clvDiete.Add(CreateListItem(n, i), n)
    Next

B4X:
Sub CreateListItem(Text As String, ImageName As String) As Panel
    Dim p As B4XView
    p = xui.CreatePanel("")
  
    p.Top = 0
    p.Left = 0
    p.Width = clvDiete.AsView.Width
    p.Height = 200dip
    'p.LoadLayout("element_Pasto") 'Commented for testing
    p.Color = Colors.Red
    p.SetColorAndBorder(p.Color, 1dip, Colors.Black, 40dip) 'want to round the panel
    'lblTitlePasto.SetColorAndBorder(lblTitlePasto.Color, 1dip, 0xFF00C482, 10dip)

    'lblTitlePasto.Text = Text
  
    p.Top = 0
    p.Left = 0
    p.Width = clvDiete.AsView.Width

    Return p
End Sub

I tried to round the corners of the single panel, but as you can see only the border follows the idea, the red filling is going out intead.. why this happends?Thanks in advance guys
 

Attachments

  • Screenshot_20210609_113913_b4a.example.jpg
    94.7 KB · Views: 96

Mike1970

Well-Known Member
Licensed User
Longtime User
Oh wow, this means that with this code it behave like on iOS?
in the example "pnl" is the child or the parent?

Edit: I tried, the answer is "the Parent"
I did not know it could be done. Awesome. Thanks
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…