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

When I put "flingContainer.setAdapter(arrayAdapter);" into the OnCreate(), it can be seen when the activity start! But when I put "flingContainer.setAdapter(arrayAdapter);" into the OnClickListener of a button , the view cannot be seen! #189

Open
jzqiao opened this issue Mar 1, 2017 · 5 comments

Comments

@jzqiao
Copy link

jzqiao commented Mar 1, 2017

No description provided.

@jzqiao jzqiao changed the title When I put "flingContainer.setAdapter(arrayAdapter);" into the OnCreate(), it can be seen when the activity start! When I put "flingContainer.setAdapter(arrayAdapter);" into the OnCreate(), it can be seen when the activity start! But when I put "flingContainer.setAdapter(arrayAdapter);" into the OnClickListener of a button , the view cannot be seen! Mar 1, 2017
@QAFlexsin
Copy link

I have same issues can you help me I want show my view after response but my view not show. My adapter constructor call but adapter getView and getCount method not call.

@jzqiao
Copy link
Author

jzqiao commented Mar 21, 2017

Have you called the method notifyDataSetChanged() of the adapter?

@QAFlexsin
Copy link

yes I have called notifyDataSetChanged() after get response from retrofit library but it's not working.

@jzqiao
Copy link
Author

jzqiao commented Mar 21, 2017

Can you pack the code and send it to [email protected]? If solved the problem, I would feedback to you as soon as possible.

@JonatanPanduro
Copy link

I got the same problem using setAdapter in other function on my Fragment, getCount() and getView() were never called on adapter, but using notifyDataSetChanged() in this way
/*arrayAdapter = new CustomBaseAdapter(getActivity(), list);
flingContainer.setAdapter(arrayAdapter);
arrayAdapter.notifyDataSetChanged();
*/
it works

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

3 participants