Android Question ListView with AddTwoLinesAndBitmap2

Alberto Iglesias

Well-Known Member
Licensed User
Anybody know how to centralize the first label verticaly when the SecondLabel is visible = false?

Other question: Some way to resize bitmap and centralize verticaly in line?
 

somed3v3loper

Well-Known Member
Licensed User
B4X:
    If list.TwoLinesAndBitmap.SecondLabel.Visible = false Then
        list.TwoLinesAndBitmap.Label.Gravity=Gravity.CENTER
    End If
?

I think you can also have access to imageview the same way
 

Alberto Iglesias

Well-Known Member
Licensed User
This if for gravity in the line horizontaly, not in the entire line (between 2 lines) ....

I need like some:

[PICTURE]
[PICTURE] xxxxxxxxxxxxxxx
[PICTURE]

and not like this

[PICTURE] xxxxxxxxxxxxxxx
[PICTURE]
[PICTURE]
 

somed3v3loper

Well-Known Member
Licensed User
B4X:
list.TwoLinesAndBitmap.Label.Top=list.Top
list.TwoLinesAndBitmap.Label.Height=list.TwoLinesAndBitmap.ItemHeight
might be a stupid solution :D
 

klaus

Expert
Licensed User
With ListView.TwoLinesAndBitmap you have access to all three views:
ListView.TwoLinesAndBitmap.Label
ListView.TwoLinesAndBitmap.SecondLabel
ListView.TwoLinesAndBitmap.ImageView
With ListView.TwoLinesAndBitmap.ItemHeight
and the Left, Top, Width, Height properties of the three views you can dimension and position them to your needs.
Without seeing what you have done it's difficult to give a concrete advice.
It would have been much more efficient if you had posted a small project showing the problem.
 

asales

Well-Known Member
Licensed User
I need like some:

[PICTURE]
[PICTURE] xxxxxxxxxxxxxxx
[PICTURE]
Try this:
B4X:
ListView1.TwoLinesAndBitmap.SecondLabel.Visible = False
ListView1.TwoLinesAndBitmap.Label.Height = ListView1.TwoLinesAndBitmap.ItemHeight
ListView1.TwoLinesAndBitmap.Label.Gravity = Gravity.CENTER_VERTICAL
 
Top