Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-10 Thread 伟刘
hi steve, please help me, i already registered in the mailing list, but i could not send mail to this group for i have never received the mail i sent . Could you help me on this? thanks 2012/7/10 Steve steveyzh...@gmail.com Thanks for Garreau and other There is a topic that I'm interested

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-09 Thread Steve
Thanks for Garreau and other There is a topic that I'm interested in. I also check why cacheColorHint interrupt the performance. #00 means transparent to background, so the View must blend to back gourd very frame. It's terrible for performance. Some reference for more information:

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-04 Thread jean-francois garreau
I finally found the source of all my GC ! it comes from my activity xml layout... Indeed for my expandView, I use this : ExpandableListView android:id=@+id/resultListResult android:layout_width=fill_parent android:layout_height=fill_parent

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
I already saw that presentation and I can't use the ViewHolder pattern because i need a customView. So I'm looking for a way to optimize my CustomView because I don't know what I'm doing wrong with this view that causing thoses GC Le lundi 2 juillet 2012 18:11:32 UTC+2, Daniel Drozdzewski

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau jean.francois.garr...@gmail.com wrote: I already saw that presentation and I can't use the ViewHolder pattern because i need a customView. That makes absolutely no sense whatsoever. - TextView inherits from View - ImageView inherits from

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Kostya Vasilyev
A custom view, assuming it's at the root of your item layout, is just as good as a view holder. Here is what you can do: - Override onFinishInflate in your item layout root view - Call this.findViewById to find children - Store them as member variables - Access in the adapter's getView, like

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
Ok so can you please explain me how to do a view like this : -- *NameMovie* 1h20min 11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm - -- Text(in bold) SubText(in gray) Text1 (in gray) Text2 (in gray) Text3 (in bold) Text4 (normal)

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 7:48 AM, jean-francois garreau jean.francois.garr...@gmail.com wrote: Ok so can you please explain me how to do a view like this : -- NameMovie 1h20min 11:00am | 2:00pm | 4:00pm | 8:00pm | 10:00pm - That is a single TextView,

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Daniel Drozdzewski
On 3 July 2012 12:48, jean-francois garreau jean.francois.garr...@gmail.com wrote: Ok so can you please explain me how to do a view like this : -- *NameMovie* 1h20min 11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm - -- Text(in

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
Ok I will try that thanks ! But I think the problem is somewhere else because, I comment all the code of my adapter in order to return static string for fix number of child and group items and I still have lots of GC So the problem maybe doesn't comes finally from my CustomView I

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 8:37 AM, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: See Mark's comment. If you can get away with one View. If however each of those times is clickable, then just set max number of TextViews in each list element, as simply removing unused ones by calling

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Daniel Drozdzewski
On 3 July 2012 13:40, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jul 3, 2012 at 8:37 AM, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: See Mark's comment. If you can get away with one View. If however each of those times is clickable, then just set max number of TextViews

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
Ok thank you So first of all i think that as I didn't identify what's causing all my GC I will not solves this UI problem. But After, i will try your solutions. regards Le mardi 3 juillet 2012 14:45:22 UTC+2, Daniel Drozdzewski a écrit : On 3 July 2012 13:40, Mark Murphy

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-02 Thread jean-francois garreau
little Up beacause not fixed Le jeudi 28 juin 2012 16:12:35 UTC+2, jean-francois garreau a écrit : The problem is : as I'm creating my custom view heriting from View, I don't have any findById so the pattent viewHolder won't be useFull for me :( And I'm already implemnting it with the view

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-02 Thread Daniel Drozdzewski
On 2 July 2012 12:20, jean-francois garreau jean.francois.garr...@gmail.com wrote: little Up beacause not fixed Le jeudi 28 juin 2012 16:12:35 UTC+2, jean-francois garreau a écrit : The problem is : as I'm creating my custom view heriting from View, I don't have any findById so the pattent

[android-developers] Re: Problem optimizing views for having a fast scroll

2012-06-28 Thread jean-francois garreau
You mean : public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { ObjectSubViewNew subView = null; if (convertView == null) { subView = new ObjectSubViewNew(mainContext,

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-06-28 Thread Justin Anderson
Nope... http://lmgtfy.com/?q=android+viewholder+pattern Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jun 28, 2012 at 7:50 AM, jean-francois garreau jean.francois.garr...@gmail.com wrote: You mean : public View getChildView(int

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-06-28 Thread Justin Anderson
Usually the best thing you can do for scroll performance of a list is to implement view recycling... Are you doing that? Reading over this I realized that it didn't make sense... You don't implement view recycling. You implement the ViewHolder pattern to help with scroll performance issues.

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-06-28 Thread jean-francois garreau
The problem is : as I'm creating my custom view heriting from View, I don't have any findById so the pattent viewHolder won't be useFull for me :( And I'm already implemnting it with the view recycling view system. Indeed, in my View I use some Paint elements that I keep in the instance of my