android - Reflect Settings change in View on update -


in android app, use sharedpreferences let user manage settings. after user changes setting, , returning app settings page, want views (fragments) use latest values sharedpreferences.

the changes include reloading custom view use color scheme or remove filtering list view.

currently when app restarted, required changes applied. convinced there way solve problem, unable figure out.

assume supporting android 2.2 , above, newer apis may not used unless present inside support library.

not sure question seems me when user changes setting , hits button return fragment not seeing changes? if case because when user goes android reinstates version of fragment on stack (the 1 before changes made). suggestion try moving loading of new shared prefs onresume method fragment. way should loaded when user goes back.

try this

@override public void onresume(){ super.onresume(); setcontentview(r.layout.currentfrag);   } 

this should reload page correct changes.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -