Bug with repeating backgrounds?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Bug with repeating backgrounds?

Postby sandis84 » Tue Sep 08, 2009 8:31 am

I am experiencing extremely weird behaviour with repeating backgrounds. My application seem to arbitrarily fail to paint the repeating image, and instead choose to streach the image over the entire surface. Since the error only happens about 1-2% of the time it is very hard to track down the source of this bug. Have anyone else experienced this?

edit: it is not due to a memory leak, or atleast the activities onLowMemory() isnt called when the bug appears. Im lost.

edit2: I have done further investigations. The bug can appear on other things then the repeating background. However, the repeating background first introduced the bugs. This can be due to the fact that the SDK has trouble interpreting the repeating backgrounds. Trying to view them in eclipse generates an error. While they work in the application 98% of the time, having layouts that cannot be viewed can disturb the generation of R.java, if I have understood everything correctly. However, doing all repeating patterns in code instead of XML did NOT help. But I can be quite sure that the error is in R.java. If I give a TextView android:background="@color/transparent", then sometimes it is given som drawable as background. If I give it android:background="#00000000", which is the same thing, then the error never appears.

So is there any way to check if R.java contains errors? Or can I force R.java to re-generate?
sandis84
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Fri Aug 07, 2009 3:54 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests