Android-Support-Preference-V7-Fix icon indicating copy to clipboard operation
Android-Support-Preference-V7-Fix copied to clipboard

how to get items from custom view

Open danwguy opened this issue 6 years ago • 1 comments

I have a custom preference layout because I needed a progress dialog in one of my preferences, so I used a custom widget layout and just created a simple ConstraintLayout with a ProgressBar in it. The problem I am having is, I can't get a hold of that ProgressBar from my PreferenceFragment to update the progress based on the action that is happening. Essentially I am allowing a user to reset their app, it deletes all the SharedPreferences, then exits the app and restarts it. I am using commit() not apply() for the SharedPreferences because using apply() then calling exit() and loading the app back up, the SharedPreferences don't actually get wiped. The app loads with the old preferences still in tact. All that aside, I need to know how to get a hold of the ProgressBar that is inside a custom widget layout from the PreferenceFragment. I can provide code samples if needed, it is pretty simple so I wasn't sure if it was needed. Thank you.

danwguy avatar Jan 23 '19 23:01 danwguy

Some code would be helpful. It basically depends on what techniques you use now.

gregkorossy avatar Apr 11 '19 10:04 gregkorossy