Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get items from custom view #194

Open
danwguy opened this issue Jan 23, 2019 · 1 comment
Open

how to get items from custom view #194

danwguy opened this issue Jan 23, 2019 · 1 comment

Comments

@danwguy
Copy link

danwguy commented Jan 23, 2019

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.

@gregkorossy
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants