Android Question [Solved] how to increase font for Options and Short Options in preference dialog ?

AnandGupta

Expert
Licensed User
Longtime User
I use below code to increase the font size for text items,

Untitled 1.jpg

how to increase for Options and Short Options ?
 
Solution
For shortOptions:
B4X:
 For i = 0 To prefdialog.PrefItems.Size - 1
        Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
        If pi.ItemType = prefdialog.TYPE_SHORTOPTIONS Then
            Dim c As B4XComboBox=prefdialog.CustomListView1.GetPanel(i).GetView(1).Tag
            c.cmbBox.TextSize=26
        End If
    Next
For Options:
B4X:
 For i = 0 To prefdialog.PrefItems.Size - 1
        Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
        If pi.ItemType = prefdialog.TYPE_OPTIONS Then
        Dim lbl As B4XView = prefdialog.CustomListView1.GetPanel(i).GetView(1)
            Dim xfont As B4XFont=xui.CreateFont(Typeface.DEFAULT_BOLD,36)
            lbl.Font = xfont
        End If
    Next

Mahares

Expert
Licensed User
Longtime User
For shortOptions:
B4X:
 For i = 0 To prefdialog.PrefItems.Size - 1
        Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
        If pi.ItemType = prefdialog.TYPE_SHORTOPTIONS Then
            Dim c As B4XComboBox=prefdialog.CustomListView1.GetPanel(i).GetView(1).Tag
            c.cmbBox.TextSize=26
        End If
    Next
For Options:
B4X:
 For i = 0 To prefdialog.PrefItems.Size - 1
        Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
        If pi.ItemType = prefdialog.TYPE_OPTIONS Then
        Dim lbl As B4XView = prefdialog.CustomListView1.GetPanel(i).GetView(1)
            Dim xfont As B4XFont=xui.CreateFont(Typeface.DEFAULT_BOLD,36)
            lbl.Font = xfont
        End If
    Next
 
Upvote 1
Solution
Top