Android Question Can we enable/disable settings in Preferences Dialog

73Challenger

Active Member
Licensed User
Hello, can we enable/disable specific settings in preferences dialog?
I did search...didn't find any threads mentioning it. Thanks much!
 

Mahares

Expert
Licensed User
Longtime User
I did search...didn't find any threads mentioning it.
I think this is what you want. Your post is a little vague, like that 73 Challenger. You are showing only a small section of the car. Hard to tell how good it is.
B4X:
For i = 0 To prefdialog.PrefItems.Size - 1
        Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
        'Below if you want to disable all text items
        If pi.ItemType = prefdialog.TYPE_TEXT Then
            Dim txt As B4XFloatTextField = prefdialog.CustomListView1.GetPanel(i).GetView(0).Tag
            txt.TextField.Enabled =False
            Log("disabled text items")
        End If   
    Next
 
Upvote 1

73Challenger

Active Member
Licensed User
I think this is what you want. Your post is a little vague, like that 73 Challenger. You are showing only a small section of the car. Hard to tell how good it is.
B4X:
For i = 0 To prefdialog.PrefItems.Size - 1
        Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
        'Below if you want to disable all text items
        If pi.ItemType = prefdialog.TYPE_TEXT Then
            Dim txt As B4XFloatTextField = prefdialog.CustomListView1.GetPanel(i).GetView(0).Tag
            txt.TextField.Enabled =False
            Log("disabled text items")
        End If  
    Next
@Mahares and @Erel Thanks for the responses. That is what I was looking for, appreciate it.

@Mahares - As for my Challenger :) (little off topic but here are a couple of more pics). She's not a rare collectable, but nice enough to drive to shows and around town. I wanted a Mopar I could drive not leave in the garage, I take her out 3-4 times per month.
340 4bbl, .060 over, balanced, cammy < 10k on engine rebuild...she runs strong. About the only thing she needs is after market air conditioning. I'm getting too old for the original 4 x 80 air conditioning :cool:

1640797253537.png
1640797343203.png


1640797399224.png
1640797437750.png
 
Upvote 0
Top