Android Question [Solved] How to remove the cross and check (Cancel and confirm) symbol in preference dialog ?

AnandGupta

Expert
Licensed User
Longtime User
In preference dialog, I want to remove the cross and check symbol from text input as it blocks the input text.
javaw_Ddg3tREwhB.png

javaw_pzjJek6bRq.png

How to do it ?
 

AnandGupta

Expert
Licensed User
Longtime User
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Since the solution was prior to "BeforeDialogDisplayed" event, I made the code as below to get the same result,

B4X:
Private Sub PrefDialog_BeforeDialogDisplayed (Template As Object)
    For i = 0 To prefDialog.PrefItems.Size - 1
        Dim pi As B4XPrefItem = prefDialog.PrefItems.Get(i)
        prefDialog.CustomListView1.AnimationDuration = 0
        If pi.ItemType = prefDialog.TYPE_TEXT Then
            Dim pnl As B4XView = prefDialog.CustomListView1.GetPanel(i)
            Dim ft As B4XFloatTextField = pnl.GetView(0).Tag
            ft.lblClear.Left = -100dip
            ft.lblV.Left = -100dip
        else If pi.ItemType = prefDialog.TYPE_MULTILINETEXT Then
            Dim pnl As B4XView = prefDialog.CustomListView1.GetPanel(i)
            Dim ft As B4XFloatTextField = pnl.GetView(0).Tag
            ft.lblClear.Left = -100dip
            ft.lblV.Left = -100dip
        End If
    Next

End Sub
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I made the code as below to get the same result,
Why didn'y lump both text types in one inside the sub like this:
B4X:
If pi.ItemType = prefDialog.TYPE_TEXT or pi.ItemType = prefDialog.TYPE_MULTILINETEXT Then
           Dim pnl As B4XView = prefDialog.CustomListView1.GetPanel(i)
            Dim ft As B4XFloatTextField = pnl.GetView(0).Tag
            ft.lblClear.Left = -100dip
            ft.lblV.Left = -100dip
end if
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Why didn'y lump both text types in one inside the sub like this:
B4X:
If pi.ItemType = prefDialog.TYPE_TEXT or pi.ItemType = prefDialog.TYPE_MULTILINETEXT Then
           Dim pnl As B4XView = prefDialog.CustomListView1.GetPanel(i)
            Dim ft As B4XFloatTextField = pnl.GetView(0).Tag
            ft.lblClear.Left = -100dip
            ft.lblV.Left = -100dip
end if
Well I had doubt that -100dip may not be correct for B4J module where multiline text is a big one. So I left it as a separate case to be corrected if required, if someone uses the code.
 
Upvote 0
Top