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

TextView inside nested ViewGroup in the pager cannot be updated properly #63

Open
hrhktkbzyy opened this issue Aug 25, 2015 · 0 comments

Comments

@hrhktkbzyy
Copy link

I just modified Emil Sjölander's demo code. I add a RelativeLayout inside the page.xml. Inside this RelativeLayout, I added in a TextView, id is textViewQuizNo.

In the getView() of FlipAdapter, I set the position no to this TextView, the same as the original TextView(id is text) which is not inside a RelativeLayout, but directly inside the FrameLayout. When I run the code, the weird thing happened: The textViewQuizNo's text is 0,1,2,0,1,2,0,1,2... when I flip the page, while the text's text is 0, 1, 2, 3, 4, 5...

I dug into Emil's code for a while, and I found a solution, please refer the detailed explanation in StackOverflow: http://stackoverflow.com/questions/32194851/emil-sj%C3%B6landers-flipview-textview-inside-nested-viewgroup-in-the-pager-cannot

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

1 participant