Hello,
I have a custom list view and when I select one of the items, it goes to page5 with a customListView (clv3a).
height
I have a case statement for deciding what to populate clv3a with. Once the text is set (textDesc as string), I use the following code to populate the clv:
However, when it is created, if it is larger than the previous text that was the there, the label height is the same height as it was previously. If I go back and into it again, it is now the right height.
It still scrolls fine, so the content height is set ok.
I took logs of the label height and contentheight within the custom class and they matched up, both when it was the 'wrong' height and the right height!
I tried adding this to the bottom of the code above hoping that would fix it but it did not.
any ideas what to try?
i'd rather not upload the whole project as i'm making it for someone else, but obv will if it's really necessary!
width
with regards to the width, if i initialise it as follows:
so that the clv has some slight borders with the edge of the page, it doesn't resize the content width and some text is cropped from the right hand side, within the view. i tried
but that resized the view every time i went back into it making it smaller and smaller each time...
thanks for any help!
I have a custom list view and when I select one of the items, it goes to page5 with a customListView (clv3a).
height
I have a case statement for deciding what to populate clv3a with. Once the text is set (textDesc as string), I use the following code to populate the clv:
B4X:
clv3a.Initialize(Me, "clv3a", 100%x)
Page5.rootPanel.AddView(clv3a.AsView,0,40,100%x,100%y)
clv3a.AddTextItem(txtDesc, 1)
However, when it is created, if it is larger than the previous text that was the there, the label height is the same height as it was previously. If I go back and into it again, it is now the right height.
It still scrolls fine, so the content height is set ok.
I took logs of the label height and contentheight within the custom class and they matched up, both when it was the 'wrong' height and the right height!
I tried adding this to the bottom of the code above hoping that would fix it but it did not.
B4X:
clv3a.Clear
clv3a.AddTextItem(txtDesc, 1)
any ideas what to try?
i'd rather not upload the whole project as i'm making it for someone else, but obv will if it's really necessary!
width
with regards to the width, if i initialise it as follows:
B4X:
clv3a.Initialize(Me, "clv3a", 100%x-20)
Page5.rootPanel.AddView(clv3a.AsView,10,40,100%x,100%y)
clv3a.AddTextItem(txtDesc, 1)
so that the clv has some slight borders with the edge of the page, it doesn't resize the content width and some text is cropped from the right hand side, within the view. i tried
B4X:
clv3a.Initialize(Me, "clv3a", 100%x-20)
Page5.rootPanel.AddView(clv3a.AsView,10,40,100%x-20,100%y)
clv3a.AddTextItem(txtDesc, 1)
but that resized the view every time i went back into it making it smaller and smaller each time...
thanks for any help!