Android Question how to manipulate the text from the b4xdialog.show

Mahares

Expert
Licensed User
Longtime User
how can I change the default text style in b4xDialogs.Show? It is possible? I guess yes.
I think you are looking for something like this, although your question is too short to be sure. Here are a few choices:
B4X:
Dim l2 As B4XView= SearchTemplate.CustomListView1.DesignerLabel
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_BOLD_ITALIC), 24)
    l2.Font =f
    
    Dim l2 As B4XView= SearchTemplate.CustomListView1.DesignerLabel
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.SERIF, Typeface.STYLE_BOLD), 24)
    l2.Font =f
    
    Dim l3 As B4XView= InputTemplate.TextField1
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC), 14)
    l3.Font =f
 
Upvote 0

alian712

Member
I think you are looking for something like this, although your question is too short to be sure. Here are a few choices:
B4X:
Dim l2 As B4XView= SearchTemplate.CustomListView1.DesignerLabel
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_BOLD_ITALIC), 24)
    l2.Font =f
  
    Dim l2 As B4XView= SearchTemplate.CustomListView1.DesignerLabel
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.SERIF, Typeface.STYLE_BOLD), 24)
    l2.Font =f
  
    Dim l3 As B4XView= InputTemplate.TextField1
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC), 14)
    l3.Font =f
I think you are looking for something like this, although your question is too short to be sure. Here are a few choices:
B4X:
Dim l2 As B4XView= SearchTemplate.CustomListView1.DesignerLabel
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_BOLD_ITALIC), 24)
    l2.Font =f
   
    Dim l2 As B4XView= SearchTemplate.CustomListView1.DesignerLabel
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.SERIF, Typeface.STYLE_BOLD), 24)
    l2.Font =f
   
    Dim l3 As B4XView= InputTemplate.TextField1
    Dim f As Typeface= XUI.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC), 14)
    l3.Font =f
Very nice
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
dialog.show method? Im thinking to use the .showcustom method instead.
Since Dialog.ShowCustom(p usually involves a panel containing views, if we have a layout with one B4XFloatTextField and one edittext1:
B4X:
Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 320dip, 500dip)
    p.LoadLayout("MyDialog2")   'has 1 B4XFloatTextField and one edittext1
    
    Dim l3 As B4XView= txtFirstName.TextField   'txtFirstName is a B4XFloatTextField
    Dim f As B4XFont= xui.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC), 24)
    l3.Font =f
    
    Dim l2 As B4XView= EditText1
    Dim f As B4XFont= xui.CreateFont(Typeface.CreateNew(Typeface.SERIF, Typeface.STYLE_BOLD), 34)
    l2.Font =f
 
Upvote 0

alian712

Member
Since Dialog.ShowCustom(p usually involves a panel containing views, if we have a layout with one B4XFloatTextField and one edittext1:
B4X:
Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 320dip, 500dip)
    p.LoadLayout("MyDialog2")   'has 1 B4XFloatTextField and one edittext1
   
    Dim l3 As B4XView= txtFirstName.TextField   'txtFirstName is a B4XFloatTextField
    Dim f As B4XFont= xui.CreateFont(Typeface.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC), 24)
    l3.Font =f
   
    Dim l2 As B4XView= EditText1
    Dim f As B4XFont= xui.CreateFont(Typeface.CreateNew(Typeface.SERIF, Typeface.STYLE_BOLD), 34)
    l2.Font =f
yeah, thanks a lot
 
Upvote 0
Top