FYI, I just fixed the bug in FroYo. On Mon, Mar 8, 2010 at 12:04 PM, Brion Emde <brione2...@gmail.com> wrote: > Geez, I know it's hard to believe, but stuff like this sticks out like > a thumb to me as a Copy & Paste error. From the source I've been > looking at for TextView (please correct me if I'm in the wrong place) > at: > > http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/TextView.java;h=f55ca3fecfd93a3d95c1022bbe0694cf85b41919;hb=HEAD > > This is in the setCompoundDrawables() function, after we've determined > that we indeed have a Drawable to set: > > 1371 if (dr == null) { > 1371 mDrawables = dr = new Drawables(); > 1372 } > 1373 > > ---------This is okay > > 1374 if (dr.mDrawableLeft != left && dr.mDrawableLeft != > null) { > 1375 dr.mDrawableLeft.setCallback(null); > 1376 } > 1377 dr.mDrawableLeft = left; > > ---------But, look at the comparison here. I think it should be > if(dr.mDrawableTop != top && so on > > 1378 if (dr.mDrawableTop != left && dr.mDrawableTop != > null) { > 1379 dr.mDrawableTop.setCallback(null); > 1380 } > 1381 dr.mDrawableTop = top; > > --------- Same thing here: it should be if(dr.mDrawableRight != right > && so on > > > 1382 if (dr.mDrawableRight != left && dr.mDrawableRight != > null) { > 1383 dr.mDrawableRight.setCallback(null); > 1384 } > 1385 dr.mDrawableRight = right; > > ------- Same here: the left should be bottom > > 1386 if (dr.mDrawableBottom != left && dr.mDrawableBottom ! > = null) { > 1387 dr.mDrawableBottom.setCallback(null); > 1388 } > 1389 dr.mDrawableBottom = bottom; > > Please let me know if I'm off base here, like out in the weeds on some > dead code branch. That would be very helpful to me. > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en >
-- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en