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

0th view never being called #12

Open
spragucm opened this issue Nov 16, 2013 · 0 comments
Open

0th view never being called #12

spragucm opened this issue Nov 16, 2013 · 0 comments

Comments

@spragucm
Copy link

I have made a very simple adapter that extends baseadapter. This adapter simply sets the bg color of a child and sets the title textview of this child to "item i", where i is from 0 to whatever number-mine is 1000. When my app starts, the 0th element is never shown and the last viewable items, say 17 and 18, are both displayed as view 17. When i do Log.d("inside adapter", "Position:"+position) I get the logcat shown below. This tells me that element 0 is null at first, but then something happens before the 0th view is sent to my adapter because the 0th view is never null again. I is passed to the adapter as non-null and hence is not created. I've tried to look at your code but can't figure out why it's not passing my adapter a null view on the 0th element. Could you please look into this as it seems like a bug on your side.

Also, getChildCount() always returns actual count - 1; this may be related.

Many thanks.

11-16 13:20:03.606: D/ActivityThread(7713): setTargetHeapUtilization:0.25
11-16 13:20:03.606: D/ActivityThread(7713): setTargetHeapIdealFree:8388608
11-16 13:20:03.606: D/ActivityThread(7713): setTargetHeapConcurrentStart:2097152
11-16 13:20:03.966: D/2wayLV(7713): Null;Position:0
11-16 13:20:03.996: D/libEGL(7713): loaded /system/lib/egl/libEGL_adreno200.so
11-16 13:20:03.996: D/libEGL(7713): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
11-16 13:20:04.006: D/libEGL(7713): loaded /system/lib/egl/libGLESv2_adreno200.so
11-16 13:20:04.076: I/Adreno200-EGLSUB(7713): ConfigWindowMatch:2087: Format RGBA_8888.
11-16 13:20:04.096: E/(7713): s3dReadConfigFile:75: Can't open file for reading
11-16 13:20:04.106: E/(7713): s3dReadConfigFile:75: Can't open file for reading
11-16 13:20:04.106: D/OpenGLRenderer(7713): Enabling debug mode 0
11-16 13:20:04.106: D/2wayLV(7713): Not Null;Position:0
11-16 13:20:04.106: D/2wayLV(7713): Not Null;Position:0
11-16 13:20:04.106: D/2wayLV(7713): Null;Position:1
11-16 13:20:04.116: D/2wayLV(7713): Null;Position:2
11-16 13:20:04.116: D/2wayLV(7713): Null;Position:3
11-16 13:20:04.116: D/2wayLV(7713): Null;Position:4
11-16 13:20:04.127: D/2wayLV(7713): Null;Position:5
11-16 13:20:04.137: D/2wayLV(7713): Null;Position:6
11-16 13:20:04.137: D/2wayLV(7713): Null;Position:7
11-16 13:20:04.147: D/2wayLV(7713): Null;Position:8
11-16 13:20:04.147: D/2wayLV(7713): Null;Position:9
11-16 13:20:04.167: D/2wayLV(7713): Null;Position:10
11-16 13:20:04.167: D/2wayLV(7713): Null;Position:11
11-16 13:20:04.167: D/2wayLV(7713): Null;Position:12
11-16 13:20:04.177: D/2wayLV(7713): Null;Position:13
11-16 13:20:04.177: D/2wayLV(7713): Null;Position:14
11-16 13:20:04.187: D/2wayLV(7713): Null;Position:15
11-16 13:20:04.187: D/2wayLV(7713): Null;Position:16
11-16 13:20:04.197: D/2wayLV(7713): Null;Position:17
11-16 13:20:04.397: D/2wayLV(7713): Null;Position:0
11-16 13:20:04.407: D/2wayLV(7713): Not Null;Position:17

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