iOS Question How to set a picker font size dependent on device, dynamically?

davepamn

Active Member
Licensed User
Longtime User
I have a dynamically created picker object instantiated. I need to determine the device type, iPhone or iPad, at run time, and change the font size of the data picker dependent on device type.

B4X:
    Dim oPicker As Picker
    oPicker.Initialize("lbx" & iPickerCounter)
    oPicker.Tag=sTestId

    Dim myList As List
    myList.Initialize
    myList.Clear

    Dim oKeyValue As AttributedString
    dim sListText as string="Hello World"
    dim sListValue as string="1"

   oKeyValue.Initialize(sListText,oFont, Colors.Black)
   oKeyValue.Tag=sListValue
   myList.add(oKeyValue)

   oPicker.SetItems(0,myList)

   ScrollViewInput.Panel.AddView(oPicker,10dip,iRowOffset-(oPicker.Height/2),90%x,500dip)
 
Top