Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
public class CustomExpandableListAdapter extends BaseExpandableListAdapter { AbsListView.LayoutParams lp = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); SpannableString spanString=null; String[] groups; St

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread skink
saex wrote: > OK, Sorry guys, now i understand you > > I tryed using your answers to get the solution but it doesn't works by now, > i don't know what i'm doing wrong > > This is the code now (this code is on the handler that is being called each > second from a thread). el is the expandableListV

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
OK, Sorry guys, now i understand you I tryed using your answers to get the solution but it doesn't works by now, i don't know what i'm doing wrong This is the code now (this code is on the handler that is being called each second from a thread). el is the expandableListView and mAdapter is the

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-02 Thread skink
Lew wrote: > saex wrote: > > > argg you didn't understand me. I KNOW HOW TO GET THE VIEW, it is > > not the problem, read the full post please > >> > >> > >> > Instead of bitching and shouting at everyone trying to help you for free, > which is a pretty > darn good way to stop receiving f

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread Lew
saex wrote: > argg you didn't understand me. I KNOW HOW TO GET THE VIEW, it is > not the problem, read the full post please >> >> >> Instead of bitching and shouting at everyone trying to help you for free, which is a pretty darn good way to stop receiving free help altogether as people

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread Nobu Games
Your Adapter has these getChildView and getGroupView

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread skink
saex wrote: > What? where should i put that view? i dont understand you... > > the objective is to update one item instead of rebuilding the entire > {expandable} list view. > > So... what should i do with that view? how can i make that view to be > refreshed when i want? > > its simple: if your

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
What? where should i put that view? i dont understand you... the objective is to update one item instead of rebuilding the entire {expandable} list view. So... what should i do with that view? how can i make that view to be refreshed when i want? i'm stuck El viernes, 1 de febrero de 2013 18:

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread Kostya Vasilyev
And if you can't call getChildView, just copy the code from there to where you need it. (Can't believe I wrote "copy the code"... will my developer license be revoked now?) -- K 2013/2/1 skink > > > saex wrote: > > argg you didn't understand me. I KNOW HOW TO GET THE VIEW, it is > > no

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread skink
saex wrote: > argg you didn't understand me. I KNOW HOW TO GET THE VIEW, it is > not the problem, read the full post please > > i did read the full thread and still i think you should call getChildView as Kostya suggested pskink -- -- You received this message because you are subscr

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
argg you didn't understand me. I KNOW HOW TO GET THE VIEW, it is not the problem, read the full post please El viernes, 1 de febrero de 2013 17:10:53 UTC+1, skink escribió: > > > > saex wrote: > > I see, but i can't understand how to do what i need to do... > > > > > > just call getCh

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread skink
saex wrote: > I see, but i can't understand how to do what i need to do... > > just call getChildView pskink -- -- 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 To

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
I see, but i can't understand how to do what i need to do... El viernes, 1 de febrero de 2013 16:03:17 UTC+1, skink escribió: > > > > saex wrote: > > arg... you didn't understand me or i can't understand you > > > > getChildView and getGroupView are from the ExpandableListView, but we > are >

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread skink
saex wrote: > arg... you didn't understand me or i can't understand you > > getChildView and getGroupView are from the ExpandableListView, but we are > talking about the Adapter, no, see http://developer.android.com/reference/android/widget/ExpandableListAdapter.html pskink -- -- You receiv

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
arg... you didn't understand me or i can't understand you getChildView and getGroupView are from the ExpandableListView, but we are talking about the Adapter, i dont know how to update only the view of only the two childs i want to update, please, can you give me code example of what you want t

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread Kostya Vasilyev
Urm, for an expandable list view -- getChildView or getGroupView. -- K 2013/2/1 saex > i didn't understand you, the adapter doesn't have a getView method > > El viernes, 1 de febrero de 2013 12:50:46 UTC+1, Kostya Vasilyev escribió: >> >> Is that it? >> >> >> >> >> You could call the adapter's

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
i didn't understand you, the adapter doesn't have a getView method El viernes, 1 de febrero de 2013 12:50:46 UTC+1, Kostya Vasilyev escribió: > > Is that it? > > >> > > You could call the adapter's getView, making sure to pass the existing > view as the "convertView". > > << > > -- K > > 2013/2/

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread Kostya Vasilyev
Is that it? >> You could call the adapter's getView, making sure to pass the existing view as the "convertView". << -- K 2013/2/1 saex > i know how to get the views, the problems is that i can't reach the way to > tell the adapter to update the content of only these views... did you know? >

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
i know how to get the views, the problems is that i can't reach the way to tell the adapter to update the content of only these views... did you know? thanks El viernes, 1 de febrero de 2013 12:37:51 UTC+1, Kostya Vasilyev escribió: > > Might look something like this: > > final int nFirst = mAcc

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread Kostya Vasilyev
Might look something like this: final int nFirst = mAccountListView.getFirstVisiblePosition(); final int nLast = mAccountListView.getLastVisiblePosition(); for (int position = nFirst; position <= nLast; ++position) { View itemView = mAccountListView.getChildAt(position - nFirst); As for asking t

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
OK, i can get the childs View with: el.getChildAt(1); el.getChildAt(2); but... what shouild i do to notify these views that they must reload their content from the adapter? El viernes, 1 de febrero de 2013 11:38:42 UTC+1, Kostya Vasilyev escribió: > > While TreKing's advice to profile is of cou

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread Kostya Vasilyev
While TreKing's advice to profile is of course excellent... ...rebuilding the entire {expandable} list view just to update one item is more work that necessary. When performance is important, you can walk the list of visible item views, find the one you need to update, and do it right there. You

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread TreKing
On Fri, Feb 1, 2013 at 2:36 AM, saex wrote: > think that it is because this call ((BaseExpandableListAdapter) > mAdapter).notifyDataSetChanged(); is updating all the ExpandableListView. > Don't *think*. Profile your code and determine what is really causing your slowness. Then fix that.

[android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-01 Thread saex
I have a ExpandableListView with some groups, and each group haves only one child, with a string on it. I have a thread that get's some updated data and *each second* calls a handler that updates the string of one of the childs of the ExpandableListView and then calls this method to refresh