Coder Social home page Coder Social logo

Comments (17)

keyboardsurfer avatar keyboardsurfer commented on August 30, 2024

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.

from crouton.

gabrielittner avatar gabrielittner commented on August 30, 2024

It only happens if the PreferenceActivity is a single pane. On tablets with dual pane it works fine.

from crouton.

Leandros avatar Leandros commented on August 30, 2024

What Activity are you using?

For me its working fine with SherlockPreferenceActivity.

from crouton.

gabrielittner avatar gabrielittner commented on August 30, 2024

I'm using a normal PreferenceActivity, which overwrites onBuildHeaders() .
I'll try to create a sample project in the nexz two hours.
Am 13.10.2012 18:06 schrieb "Arvid Gerstmann" [email protected]:

What Activity are you using?

For me its working fine with SherlockPreferenceActivity.


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-9405662.

from crouton.

Leandros avatar Leandros commented on August 30, 2024

Try

Activity mActivity = this;
Croutons.showText(mActivity, "Test", Style.INFO);

from crouton.

gabrielittner avatar gabrielittner commented on August 30, 2024

I call it from my PreferenceFragment and use getActivity().

I first thought the reason is that clicking on a header in singlepane opens
a second instance of the PreferenceActivity, which shows the
PreferenceFragment (because it doesn't happen in multipane). But I couldn't
find any prove for that.

I'm currently on my way back home, I'll test when I'm there.
Am 13.10.2012 18:17 schrieb "Arvid Gerstmann" [email protected]:

Try

Activity mActivity = this;Croutons.showText(mActivity, "Test", Style.INFO);


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-9405770.

from crouton.

Leandros avatar Leandros commented on August 30, 2024

If I find some time, I'll write a demo app and try to fix the issue.

from crouton.

gabrielittner avatar gabrielittner commented on August 30, 2024

I just wrote a demo app: https://github.com/gabrielittner/CroutonTest

from crouton.

gabrielittner avatar gabrielittner commented on August 30, 2024

What I also noticed is, that the missing views are completly removed, the hierarchy viewer doesn't show them anymore after displaying Crouton.

from crouton.

keyboardsurfer avatar keyboardsurfer commented on August 30, 2024

Using the workaround I introduced in issue #24 might help.

from crouton.

HerrVoennchen avatar HerrVoennchen commented on August 30, 2024

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.

from crouton.

keyboardsurfer avatar keyboardsurfer commented on August 30, 2024

Hi @HerrVoennchen, the information you have provided is too vague for me to actually be able to help.

from crouton.

HerrVoennchen avatar HerrVoennchen commented on August 30, 2024

Hier are some screenshots. Based on the description of gabrielittner it appears to be the same problem.

screenshot_2014-01-29-14-47-05

after show a Crouton
screenshot_2014-01-29-14-47-16

If you need anything else to know, let me know.

from crouton.

HerrVoennchen avatar HerrVoennchen commented on August 30, 2024

If it helps, i created a test project yesterday to reproduce this behavior. See https://github.com/HerrVoennchen/CroutonTest

from crouton.

keyboardsurfer avatar keyboardsurfer commented on August 30, 2024

Yes, the issue can be reproduced with the code you provided.
I'd have to toy around and see what helps solving it.
It might be that the FrameLayout within the PreferenceActivity is causing this behaviour.

Have you tried attaching the Crouton to a specific ViewGroup?

from crouton.

HerrVoennchen avatar HerrVoennchen commented on August 30, 2024

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?

from crouton.

keyboardsurfer avatar keyboardsurfer commented on August 30, 2024

See README for further info.

from crouton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.