B4X:
Sub CreateListItem(Text As String) As Panel
Dim txtHBbibleText As EditText
txtHBbibleText.Initialize("txtHBBibleText")
' txtHBbibleText.Gravity = Gravity.TOP
txtHBbibleText.InputType = txtHBbibleText.INPUT_TYPE_NONE
txtHBbibleText.SingleLine = False
txtHBbibleText.TextSize = txtBibleSize
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 1dip, 1dip)
p.AddView(txtHBbibleText, 0, 0, 1dip, 1dip)
p.Color = xui.Color_White
p.Top = 0
p.Left = 0
p.Width = 100%x
txtHBbibleText.Top = 0
txtHBbibleText.Left = 0
txtHBbibleText.Width = 100%x
txtHBbibleText.Text = Text
Dim WhatHeight As Int
Dim su As StringUtils
WhatHeight = su.MeasureMultilineTextHeight(txtHBbibleText, txtHBbibleText.Text)
p.Height = WhatHeight
txtHBbibleText.Height = WhatHeight
Return p
End Sub
I can't get the whole text to fit in the panel. Also, i have a gray divider line which i set to white color and size to 0. How do i fit the text properly and remove the divider line. Each verse is a panel.