You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Duplications] [1168] Setting view not updated after changing the behavior #1312
I didn't tryout any of the possible fixes described here: #1312 (comment)
since we have summary="%s" Android should take care of it, but it seems that at least on @rperezb device (HTC) with Android 4.1.2 it doesn't
--> so I am not sure how to fix the summary display (anything else seems to work for her). It always works for my and you, so I can only add some code and @rperezb would have to test it.
hey @AndyScherzinger checked with another device, a tablet Nexus 7 Android 4.3, the view is not refreshed till you change the device orientation or go to another view and go back to settings (as with the other devices)
@rperezb I think I found the mistake, it is related to Android versions rather than tablet/phone. I was relying on the change listener mechanism of setValue which is a feature that has been introduced with Android 4.4 (API 19). So I added some pre API-19 handling for this :) - For details please see 4f7d416 committed against #1168 branch and already pushed to the beta branch @tobiasKaminsky :)
Please let us know if this works for you 😃 (worked for me for 4.0.3 in the emulator)
Activity
tobiasKaminsky commentedon Nov 26, 2015
This is working for me with nexus 4 and nexus 5 in emulator.
Maybe @AndyScherzinger (our design dev :) ) has an idea?
AndyScherzinger commentedon Nov 26, 2015
I'll have a look, but need proper internet access for cloning/checkout.
rperezb commentedon Nov 27, 2015
Double check it, the view on a mobile device is not refreshed, however, on a tablet, it's
tobiasKaminsky commentedon Nov 27, 2015
What devices and android versions have you tried?
AndyScherzinger commentedon Nov 27, 2015
Hmm strange. It seems this is specific to some Android versions even though I don't know which of them. This (35a68aa#diff-ffb88170f459941fc1526888859e39aaR80) should take care of it and change the summary value. Else I can see if implementing a onSharedPreferenceChangeListener which does this manually: http://stackoverflow.com/questions/531427/how-do-i-display-the-current-value-of-an-android-preference-in-the-preference-su or http://stackoverflow.com/questions/4823442/android-list-preferences-have-summary-as-selected-value
tobiasKaminsky commentedon Nov 28, 2015
Where do you have merged your commit? I cannot find it ;)
I think it belongs in #1168?
AndyScherzinger commentedon Nov 28, 2015
Exactly, see right be my comment here: #1168 (comment)
tobiasKaminsky commentedon Nov 28, 2015
Ah. Thought it is a new commit.
So, the problem exists even with your fix?
AndyScherzinger commentedon Nov 28, 2015
I didn't tryout any of the possible fixes described here: #1312 (comment)
since we have summary="%s" Android should take care of it, but it seems that at least on @rperezb device (HTC) with Android 4.1.2 it doesn't
--> so I am not sure how to fix the summary display (anything else seems to work for her). It always works for my and you, so I can only add some code and @rperezb would have to test it.
rperezb commentedon Nov 30, 2015
Hey, I have checked it with:
View not refreshed, mobile handsets
View refreshed:
(Code 5d77cfc )
AndyScherzinger commentedon Nov 30, 2015
Good morning @rperezb. Does that mean it only works on the tablet for you?
You refered to the path variable in your comment, is this related to the list selection? @tobiasKaminsky ?
rperezb commentedon Nov 30, 2015
hey @AndyScherzinger checked with another device, a tablet Nexus 7 Android 4.3, the view is not refreshed till you change the device orientation or go to another view and go back to settings (as with the other devices)
BugFix for #1312 - setting ListPreference selection on pre kitkat
AndyScherzinger commentedon Nov 30, 2015
@rperezb I think I found the mistake, it is related to Android versions rather than tablet/phone. I was relying on the change listener mechanism of setValue which is a feature that has been introduced with Android 4.4 (API 19). So I added some pre API-19 handling for this :) - For details please see 4f7d416 committed against #1168 branch and already pushed to the beta branch @tobiasKaminsky :)
Please let us know if this works for you 😃 (worked for me for 4.0.3 in the emulator)
rperezb commentedon Dec 1, 2015
great!
it worked
👏 👏
AndyScherzinger commentedon Dec 1, 2015
Glad to here that 😃