Turns out my super-simple adapter never had the on init-problem. But it still has the on power down-problem. Its a 100% static list with the views created on startup and put into an array. Wait a while after the power turns off and check your logs, I'm pretty sure you will se a couple of "getView":s in your logs too. It doesn't come right away, but within a minute or so after the screen goes black.
I'll revisit my slightly more complex adapters tomorrow. Cheers, Olof On Feb 15, 7:58 pm, Kostya Vasilyev <[email protected]> wrote: > On 02/15/2012 10:45 PM, Olof Hedman wrote: > > > Thanks for the log! > > Which version of android did you run it on? > > 2.3.4 and 4.0.2 > > > It made my try one more thing... > > I simplified my layout as much as I could, and this actually got rid > > of the extreme weirdness, and made my log look like yours. > > > I don't get though why it would matter. > > The problem seem to be the relative-layout I have in the background. > > (I use it for a background image + a logo shown behind the list) > > > Here is my layout with just the relative-layout commented out: > >http://pastebin.com/zFBxL97m > > > The view never resizes or anything, so there seems to be some funky- > > ness going on when it inflates the views for the Activity. > > Do you have any idea of why it would behave like this because of the > > relativelayout? > > If you wanted to investigate, I suppose you could make your own subclass > of ListView, override requestLayout and put a log statement there. > > > > > Also still weird it thinks its necessary to re-getting the views when > > the screen power down, but at least the user will only notice that > > because of slightly worse battery life:) > > By itself, the backlight turning off does not have anything to do with it. > > However, take a look at your activty's onResume to see if it tells the > view to invalidate. > > If your list view is backed by a managed cursor, the latter will be > requiried around the time of onResume, in turn causing the list view to > fully update. > > -- Kostya > > > > > > > > > > > Cheers, > > Olof -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

