B4A Library [B4X] XUI Views - Cross platform views and dialogs

Status
Not open for further replies.

Tayfur

Well-Known Member
Licensed User
Longtime User
How can i add manuelly?
B4X:
Sub Process_Globals
    Private MainForm As Form
    Private Dialog As B4XDialog
    Private XUI As XUI
    Private Base As B4XView
    Private APBar As AnotherProgressBar
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("1") 'Load the layout file.
    MainForm.Show
   
    APBar.Initialize(MainForm,"APBar")
    MainForm.RootPane.AddNode(APBar.mLbl,100,100,500,100)

 

Tayfur

Well-Known Member
Licensed User
Longtime User
Custom views must be added with the designer. You can create a layout file with a single custom view and load it whenever you want to add a new custom view.
B4X:
MainForm = Form1
    MainForm.RootPane.LoadLayout("1") 'Load the layout file.
    MainForm.Show
   
    pn.Initialize("")
    pn.LoadLayout("L2") ' it has only customview // Private APBar As AnotherProgressBar
    MainForm.RootPane.AddNode(pn,50,00,300,100)

I added like code.
But I cant control height value?
Whats the correct code/way?
 

Tayfur

Well-Known Member
Licensed User
Longtime User

Thanks @DonManfred
I notted ".SetLayoutAnimated(0,0,0,400,100) "
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
V1.67 - Tag field added to the custom views. You can set it with the designer or at runtime.
- B4XDialog - New fields: TitleBarTextColor, TitleBarFont and ButtonsFont. See the signature dialog for an example (the buttons font is set to FontAwesome):



- B4XDialog - All text fields of B4XDialog accept CSBuilder objects as well as strings (B4A and B4i).
- AnotherProgressBar is no longer limited to indeterminate state. You can modify the Value field to change its position. Note that the change is animated.
Click on the Animated Counter button in the example to see it.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
V1.70 - New B4XTimedTemplate. This template wraps other templates and creates an auto-closing dialog:



See the "options / select animal" dialog for an example. It is very simple to use.
- AnotherProgressBar - The change speed can be set with ValueChangePerSecond field. This allows using the progress bar as a visual timer. For example to show 5 seconds progress:
B4X:
AnotherProgressBar1.ValueChangePerSecond = 100 / 5
AnotherProgressBar1.SetValueNoAnimation(0) 'set the value immediately.
AnotherProgressBar1.Value = 100 'animate to 100. It will take 5 seconds.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…