Yes, there is notable lag. On Monday, June 4, 2012 9:39:14 AM UTC-7, MagouyaWare wrote: > > But are you noticing any visual lags that a user would complain about? > > If not then don't worry about optimizations... > > As far as onMeasure is concerned I know that it gets called multiple times > when setting up layouts... I believe the official number of times it's > called is "as many as it needs" ;-) > > So unless there is a notable lag I would just leave it alone... > On Jun 4, 2012 11:06 AM, "Bob Loblaw" <[email protected]> wrote: > >> So I have a ViewHolder. >> >> static private class ViewHolder { >> /** >> * Name. >> */ >> public TextView name; >> >> /** >> * Age. >> */ >> public TextView age; >> >> /** >> * Location >> */ >> public TextView location; >> /** >> * menu button. >> */ >> public Button menuButton; >> } >> >> and inside getView() I check >> if (convertView == null) { >> // inflate list item view >> // do the findviewbyids >> // set the tag of the convertview with the holder >> } else { >> holder = convertView.getTag(); >> } >> >> // other code to set text etc >> >> pretty typical stuff. >> >> The thing that makes me think if there are further refinements to be made >> is looking at the TraceView, it spends a lot of time doing >> relativelayout.onmeasure and other measurements with textview. Is there >> some way I can just bypass that? >> >> On Monday, June 4, 2012 6:30:47 AM UTC-7, MagouyaWare wrote: >>> >>> Most optimizations are going to be done in code... So the XML layout of >>> your item doesn't really help all that much. What does your adapter code >>> look like? Are you using a stock adapter or did you write your own? What >>> does your getView() method look like (so we can make sure you are using >>> ViewHolder correctly, etc...)? >>> >>> What problems are you seeing that make you want to optimize? >>> >>> Thanks, >>> Justin Anderson >>> MagouyaWare Developer >>> http://sites.google.com/site/**magouyaware<http://sites.google.com/site/magouyaware> >>> >>> >>> On Fri, Jun 1, 2012 at 11:04 AM, Bob Loblaw <[email protected]> wrote: >>> >>>> I'm trying to optimize my grid adapter item. I'm already using >>>> ViewHolder (as suggested by various google talks) when calling getView in >>>> my adapter. My xml also doesn't go that deep. There are no linear layouts, >>>> only relative layouts, and it's five layers at the deepest. Are there >>>> other >>>> tweaks that I can do? I've attached a snippet of my xml. >>>> >>>> -- >>>> 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 <[email protected]> >>>> To unsubscribe from this group, send email to >>>> android-developers+**[email protected]<android-developers%[email protected]> >>>> For more options, visit this group at >>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en> >>> >>> >>> -- >> 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 > >
-- 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

