Refer to Klaus' customview tutorial. We can create #DesignerProperty like as belows
#DesignerProperty: Key: Weekdays, DisplayName: day of week, FieldType: String, DefaultValue: Sunday List: Sunday|Monday|Tuesday|.... |Saturday
So I think that there is probably, we can keep png files in Files folder.
P.S. I have just know that FieldType is only String or Boolean. (can't be Int or Bitmap)
Due to writing Xui CustomView, we can't know Photos available in profiles folderWhat are the pictures? Each user has a different picture.
If we can read the filename of a specific png, and Use the addlist command It should be good later.
Due to writing Xui CustomView, we can't know Photos available in profiles folderWhat are the pictures? Each user has a different picture.
If we can read the filename of a specific png, and Use the addlist command It should be good later.
If the image file is not known a priori, because the programmer user will use one of those found in the Files folder, you will not be able to create this "Designer property" of your custom view.
You will only be able to create a property that can only be set by code, of type Bitmap (better B4XBitmap).
Something like:
Class_Globals:
Private mLogo As B4XBitmap
B4X:
Public Sub setLogo(Logo As B4XBitmap)
mLogo = Logo
'I assume your custom view will have a B4XImageView:
MyB4XImageView1.Bitmap = Logo
End Sub
Public Sub getLogo As B4XBitmap
Return mLogo ' or Return MyB4XImageView
End Sub
User's project:
Dim AAA As TheeraCustomView ' Added to a layout
AAA.Logo = xui.LoadBitmapResize(...)
If your custom view has a B4XImageView, you don't need that variable, mLogo, use directly MyB4XImageView.Bitmap also in the set and get properties:
B4X:
Public Sub setLogo(Logo As B4XBitmap)
MyB4XImageView1.Bitmap = Logo
End Sub
Public Sub getLogo As B4XBitmap
Return MyB4XImageView.Bitmap
End Sub
Due to writing Xui CustomView, we can't know Photos available in profiles folderWhat are the pictures? Each user has a different picture.
If we can read the filename of a specific png, and Use the addlist command It should be good later.
GitHub: https://github.com/pyhoon/qrcode-with-logo-b4a I think this is my first time creating XUI custom view library. Here is the first version. As usual, welcome everyone to contribute to this open source project. Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1...