-
Notifications
You must be signed in to change notification settings - Fork 667
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
Crouton "destroys" PreferenceFragment #19
Comments
From the first look it seems likely that the PreferenceFragment does not like the fact that Crouton is adding itself to the Window of the calling Activitiy. |
It only happens if the PreferenceActivity is a single pane. On tablets with dual pane it works fine. |
What For me its working fine with |
I'm using a normal PreferenceActivity, which overwrites onBuildHeaders() .
|
Try Activity mActivity = this;
Croutons.showText(mActivity, "Test", Style.INFO); |
I call it from my PreferenceFragment and use getActivity(). I first thought the reason is that clicking on a header in singlepane opens I'm currently on my way back home, I'll test when I'm there.
|
If I find some time, I'll write a demo app and try to fix the issue. |
I just wrote a demo app: https://github.com/gabrielittner/CroutonTest |
What I also noticed is, that the missing views are completly removed, the hierarchy viewer doesn't show them anymore after displaying Crouton. |
Using the workaround I introduced in issue #24 might help. |
Hi, the workaround does not help, since in my case. No stucking messages in queue. I'm calling the crouton from the underlying activity (SherlockPreferenceActivity) of the Fragment (PreferenceFragment) and it messes up my fragment. Any other suggestions? Using latest version of Courton (1.8.2). Since the images of the originial poster aren#t available anymore, i can provide some to show how it looks like on my devices. |
Hi @HerrVoennchen, the information you have provided is too vague for me to actually be able to help. |
If it helps, i created a test project yesterday to reproduce this behavior. See https://github.com/HerrVoennchen/CroutonTest |
Yes, the issue can be reproduced with the code you provided. Have you tried attaching the Crouton to a specific |
hmm Tested it on test project with ViewGroup.NO:ID and ViewGroup.TEXT_ALIGNMENT_VIEW_START but has no different effect, as far as i can see. You mentioned the FrameLayout in the PreferenceActivity.. does this layout comes from the android preference view infrastructure? |
See README for further info. |
This is how my PreferenceFragment looks like: https://picasaweb.google.com/lh/photo/QbpRCxQHqVATtMqhpP7OPhehlnpMhIUyAwoYnhPIGog?feat=directlink
When showing a Crouton:
https://picasaweb.google.com/lh/photo/MJwaGoIBiO7NNtpmprypnBehlnpMhIUyAwoYnhPIGog?feat=directlink
The text was updated successfully, but these errors were encountered: