Android Question Change text in PreferenceActivity

bgsoft

Well-Known Member
Licensed User
Longtime User
I can change the text once I created the preference?

For example:

B4X:
Dim cat1  As AHPreferenceCategory
screen.Initialize("Config" ,"")

cat1.AddEditText2("VolumeRing","Volume Ring" ,"(0-10)","10",2,False,True,"")

screen.AddPreferenceCategory(cat1)

Text "Ring Volume", I want to add a variable to output the current value.

When I create preference is the text:
Ring Volume
Before calling preference I want:
Volume Ring (7)

If I put this:

B4X:
cat1.AddEditText2 ("VolumeRing" & VolumeRingNow & ")", "Ring Volume", "(0-10)", "10", 2, False, True, "")

It creates a new preference.

The problem is that when I create the preference, the user still does not change the value, this value can change at any time.
So before calling the preference I have to upgrade.

The code is just an example to make it compressible my bad English :D

thanks
 

bgsoft

Well-Known Member
Licensed User
Longtime User
Yes, is the first line of my example (Dim cat1 As AHPreferenceCategory)
And in your example, I have not seen anything to do what I ask.
 
Upvote 0

bgsoft

Well-Known Member
Licensed User
Longtime User
Thanks Erel
 
Upvote 0
Top