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

Ability to not use setContentView #24

Open
tasomaniac opened this issue Nov 24, 2014 · 4 comments
Open

Ability to not use setContentView #24

tasomaniac opened this issue Nov 24, 2014 · 4 comments
Assignees

Comments

@tasomaniac
Copy link

Since I was using this library, I was not happy with the setContentView method. It is because it is not similar to the methods you would use when you normalle use Fragments.

When I use ProgressListFragment it is like magic. Even when I use custom layout in the onCreateView it gets the ListView and does all the magic automatically.

Here is the solution in my mind. I hope I can tell it well.
If you have a FrameLayout in the content_container FrameLayout on top of the emptyView. You can use that id as a mContentView. When developer use custom layout in onCreateView and have a view with that id, you can use it right away. If the developer don't have a view with that id, you can expect usage of setContentView. If the developer doesn't do any of that, you can throw a IllegalStateException.

What do you think? Sorry if the English is not good.

@johnkil
Copy link
Owner

johnkil commented Nov 24, 2014

@tasomaniac Good point, I will try to do this in the next release!

@johnkil johnkil self-assigned this Nov 24, 2014
@tasomaniac
Copy link
Author

I would be really cool. It would mean that the code will be fully
compilable even if you remove Progress word from ProgressFragment and just
use Fragment.

And later if the developer decide to integrate it, he will just add
Progress word and magic will happen :)

On Mon, Nov 24, 2014, 5:22 PM Evgeny Shishkin notifications@github.com
wrote:

@tasomaniac https://github.com/tasomaniac Good point, I will try to do
this in the next release!


Reply to this email directly or view it on GitHub
#24 (comment)
.

@mitsus
Copy link

mitsus commented Dec 4, 2014

Dear Johnkil,
i use setContentView into new thread called from onActivityCreated, but i have this errors:

java.lang.IllegalStateException: Content view not yet created
com.devspark.progressfragment.SherlockProgressFragment.ensureContent(SherlockProgressFragment.java:274)
com.devspark.progressfragment.SherlockProgressFragment.setContentShown(SherlockProgressFragment.java:204)
com.devspark.progressfragment.SherlockProgressFragment.setContentShown(SherlockProgressFragment.java:178)

...on what do you think depends the problem?

Thanks and Best Regards

@vbenso
Copy link

vbenso commented Aug 3, 2015

I'm having the same problem as @mitsus pointed.
Does anybody has any further information on this issue?

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

4 participants