Changing background colors affects unrelated views in another activity
I'm currently having a really weird issue in an Android app I'm developing.
The short story is that background colors I set programmatically in one
Activity are appearing on completely unrelated views in another activity.
Basically, in one Activity I have a ListView in which the user can select
or unselect any item by tapping it. When selected, an item is highlighted
with an orange background. This background color is set programmatically
via a ListAdapter.
The user may then navigate to a second Activity with a completely
different layout in which every view is supposed to have a white
background (this is set in the appropriate style/layout xml files).
However, sometimes, the entire background of this second Activity turns
the same orange color as the highlighted ListView items in the first
Activity. Nowhere in the second Activity are background colors set
programmatically, so I have no idea how they're changing color at all, let
alone why they're turning orange.
If that's not weird enough, it only consistently happens on one device (a
Droid Razr Maxx with Android 4.1.2) out of the 10-15 devices of varying
manufacturers and Android versions I've tested the app on so far. Other
than on that Razr, I've only seen it happen once on one other device. And
even on that one, after selecting/unselecting different ListView items and
going back and forth between the Activities a couple times, the issue
disappeared and I couldn't reproduce it again.
Anybody have an idea what might be going on?
No comments:
Post a Comment