I started with this:
To move the buttons.
Unfortunately the first time I didn't need on of the buttons it failed. Evidently the buttons are not created if they are not needed.
So I did this:
Which worked great in B4J, unfortunately it fails in B4A in the B4XDialog, not in my code:
So, Ultimately I just tested the length of the text for each button, probably what I should have done in the first place.
Hope this helps someone.
B4X:
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Positive)
B.SetLayoutAnimated(0, B.Parent.Width * .02, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Negative)
B.SetLayoutAnimated(0, B.Parent.Width * .35, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Cancel)
B.SetLayoutAnimated(0, B.Parent.Width * .68, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
Unfortunately the first time I didn't need on of the buttons it failed. Evidently the buttons are not created if they are not needed.
So I did this:
B4X:
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Positive)
If B.IsInitialized Then B.SetLayoutAnimated(0, B.Parent.Width * .02, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Negative)
If B.IsInitialized Then B.SetLayoutAnimated(0, B.Parent.Width * .35, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Cancel)
If B.IsInitialized Then B.SetLayoutAnimated(0, B.Parent.Width * .68, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
B4X:
Error occurred on line: 214 (B4XDialog)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
B4X:
If Y.Length > 0 Then
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Positive)
B.SetLayoutAnimated(0, B.Parent.Width * .02, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
End If
If N.Length > 0 Then
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Negative)
B.SetLayoutAnimated(0, B.Parent.Width * .35, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
End If
If Can.Length > 0 Then
Dim B As B4XView = KimsDlg.GetButton(xui.DialogResponse_Cancel)
If B.IsInitialized Then B.SetLayoutAnimated(0, B.Parent.Width * .68, B.Parent.Height - (B.Height + 10dip), B.Parent.Width * .3, B.Height)
End If