My feeling was what I did was bad so your comment of "Oh, heavens, please don't do that. You're begging for a memory leak. " is inline with my feeling about what I did. But I am not 100% sure why I would have a memory leak.
The time is almost all spend in the call to setContentView What I meant by 4 views was 4 layouts. Each layout has several textViews,editTexts,imageButtons,Buttons and a list view. I use the vewFlipper so that I can animate and the switch between screens. On Feb 17, 3:35 pm, Mark Murphy <[email protected]> wrote: > Marc wrote: > > I may have found a solution. I put a call to > > getLayoutInflater().inflate(R.layout.new_order, null); > > and assign it to a static variable. > > Oh, heavens, please don't do that. You're begging for a memory leak. > > >> I have an activity whos layout is made up of 3 viewFlippers and 4 > >> views. > > If you only have four views, why do you need three flippers? > > >> The first the time it loads setContentView takes about 8s to > >> load. After that each time the activity (which is a sub-activity) is > >> launched it only takes about 1 second. > > >> Does anybody have some insight on this? > > The problem most likely has nothing to do with ViewFlippers. > > Use Traceview, or even just Log statements, to figure out where your > time is being spent. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android 2.0 Programming Books:http://commonsware.com/books -- 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

