Android Question xCustomListview and B4xDialog

mscientist33

Active Member
Licensed User
I am having an issue when using B4XDialog with a xCustomListView. I use the following

B4X:
    pb = xui.CreatePanel("")
    pb.SetLayoutAnimated(0, 0, 0, 80%x,80%y)
    pb.LoadLayout("layoutWithxCLV")

The I have code that loads the xCLV with other views

B4X:
    Dim pCLVitems As B4XView = xui.CreatePanel("")
    pCLVitems.SetLayoutAnimated(0, 0, 0, itemsCLV.AsView.Width,60dip)
    pCLVitems.LoadLayout("clvItem")

Then I call the dialog

B4X:
mdialog.PutAtTop = True 'put the dialog at the top of the screen
    Wait For (mdialog.ShowCustom(pb, "OK", "", "")) Complete (Result As Int)

Everything is loaded properly but the xCustomListView is wider than the dialog that appears. So much that the button is almost off the screen.

Since the xCLV is in the layout "layoutWithxCLV" with 80%x, and 80%y, I have the xCLV in the layout anchored in all four sides, shouldn't it size to the layout size?

I am only having this issue with a xCLV. I can use labels etc and then the dialog seems to work properly. I have the same style dialog working using BBCodeView and it works perfectly. Does it look like i'm doing anything wrong creating the B4xViews?
 

Mahares

Expert
Licensed User
Longtime User
I am only having this issue with a xCLV
Without seeing your small project with all layouts and code it is hard to answer, at least for me. Attached is a screenshot of an xClv inside B4XDialog that looks fine. If you can reproduce it in a small project without giving up sensitive data, it might help someone answer you.
 

Attachments

  • xClvInsideB4XDialog.png
    xClvInsideB4XDialog.png
    20.5 KB · Views: 113
Upvote 0

mscientist33

Active Member
Licensed User
Without seeing your small project with all layouts and code it is hard to answer, at least for me. Attached is a screenshot of an xClv inside B4XDialog that looks fine. If you can reproduce it in a small project without giving up sensitive data, it might help someone answer you.
It is a huge project and would take a good while to do that ha ha. I might would be easier if you would send me your code for that so that I could compare if you are willing.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
might would be easier if you would send me your code for that so that I could compare if you are willing.

In that case, attach your layout files, that is all the .bal files if you cannot load the project. Someone besides me will also look at it. When you are dealing with layouts, it is always good to include those files as attachments.
 
Upvote 0
Top