Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-29 Thread John Goche
On Wed, Sep 28, 2011 at 10:32 PM, Studio LFP studio@gmail.com wrote: I don't mean to shift gears here on you, but you are putting these EditTexts in a ListView and you may not even need the ListView. A ListView is usually not edited in place and actually are very friendly when you try

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-29 Thread Studio LFP
A ListView is usually not edited in place and actually are very friendly when you try to. Your statements seem contradictory. You say a list view is not edited in place. Then you say a list view is very friendly when you try to edit it in place? Whoops, sorry about that, it should say

[android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
Hello, I have a dynamically generated list of EditText widgets. When the text in one of them is changed I need to update the text in some of the others. I have setup a TextWatcher for each EditText in the adapter's getView() method but while I can use this to update the underlying model I cannot

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread TreKing
On Wed, Sep 28, 2011 at 8:27 AM, John Goche johngoch...@googlemail.comwrote: I wonder whether anyone on this list could kindly point me towards a solution. Can't you just have a MapMyType, ListMyType that represents the relationship between the object being edited and the ones that have to be

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
On Wed, Sep 28, 2011 at 3:46 PM, TreKing treking...@gmail.com wrote: On Wed, Sep 28, 2011 at 8:27 AM, John Goche johngoch...@googlemail.comwrote: I wonder whether anyone on this list could kindly point me towards a solution. Can't you just have a MapMyType, ListMyType that represents the

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread TreKing
On Wed, Sep 28, 2011 at 9:42 AM, John Goche johngoch...@googlemail.comwrote: Wel, suppose MyType is the object being edited, in this case an EditText widget. No, it'd be whatever data object you've defined that your list represents. The adapter populates the list via getView(). In

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
On Wed, Sep 28, 2011 at 4:47 PM, TreKing treking...@gmail.com wrote: On Wed, Sep 28, 2011 at 9:42 AM, John Goche johngoch...@googlemail.comwrote: Wel, suppose MyType is the object being edited, in this case an EditText widget. No, it'd be whatever data object you've defined that your list

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
On Wed, Sep 28, 2011 at 5:18 PM, John Goche johngoch...@googlemail.comwrote: I do have such methods. I cannot get the widget rows to observe the changes in the data due to an input in one of the rows. Well, I could call setAdapter() again each time the user types a keystroke, but then the

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread TreKing
On Wed, Sep 28, 2011 at 10:40 AM, John Goche johngoch...@googlemail.comwrote: The problem is that it refreshes the whole list view and the row the user is editing loses the focus. Instead I need to only refresh individual rows in the list. Is there a way to do this? Oh. Your life got

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
On Wed, Sep 28, 2011 at 6:00 PM, TreKing treking...@gmail.com wrote: On Wed, Sep 28, 2011 at 10:40 AM, John Goche johngoch...@googlemail.comwrote: The problem is that it refreshes the whole list view and the row the user is editing loses the focus. Instead I need to only refresh individual

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread TreKing
On Wed, Sep 28, 2011 at 11:21 AM, John Goche johngoch...@googlemail.comwrote: In fact I already have a ListMyType, If I set up another ListEditText I could refresh this inside getView() instead I think, right? Pretty much.

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
Hi TreKing, I have tried implementing the solution you suggested. I found that when I call setText programmatically rather than from user input the TextWatcher's afterTextChanged() method is also called so I had to implement a static boostan lock to prevent a stack overflow from all the

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread TreKing
On Wed, Sep 28, 2011 at 12:58 PM, John Goche johngoch...@googlemail.comwrote: What's wrong with this code. Am I updating some EditText widgets which are off the screen somewhere in memory? What's the likely cause of the problem? I've tried calling postInvalidate() on the EditTexts but no

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread Studio LFP
Mr. Goche, How much data and what is the source of the data you are using to create the EditText views? Knowing the data load and its source would help a lot. Steven Studio LFP http://www.studio-lfp.com -- You received this message because you are subscribed to the Google Groups Android

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
Studio LFP, First of all, thank you for your replies. The data source is simply a data structure in memory whose size can vary but for testing purposes it is not very large. I am now looking at your solution as well, but am really curious as to why the code I have posted is not working. I am

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread TreKing
On Wed, Sep 28, 2011 at 2:14 PM, John Goche johngoch...@googlemail.comwrote: Here is my issue, maybe someone can help, if I give two calls of the following type: evView1 = (EditView )findViewById( R.id.evView); evView2 = (EditView )findViewById( R.id.evView); do evView1 and evView2 point

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
On Wed, Sep 28, 2011 at 9:24 PM, TreKing treking...@gmail.com wrote: On Wed, Sep 28, 2011 at 2:14 PM, John Goche johngoch...@googlemail.comwrote: Here is my issue, maybe someone can help, if I give two calls of the following type: evView1 = (EditView )findViewById( R.id.evView); evView2 =

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread John Goche
I see, my code post got list somehow, I've tried to simplify it a bit, here it is: Still trying to figure out why the text edits won't update... private class BarAdapter extends BaseAdapter { ArrayListEditText globalNotesList = new ArrayListEditText(); @Override public int

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread Studio LFP
First of all, thank you for your replies. Sure thing, always willing to help. The data source is simply a data structure in memory whose size can vary but for testing purposes it is not very large. I am now looking at your solution as well, but am really curious as to why the code I

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread Studio LFP
OK, in that case, given the code I've posted, how come isn't setText() working? In my testing I've only got three visible rows at the moment, and still can see the same problem. If you are using a ListView and you are letting it control the views, it becomes very difficult to deal with.

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread Studio LFP
I don't mean to shift gears here on you, but you are putting these EditTexts in a ListView and you may not even need the ListView. A ListView is usually not edited in place and actually are very friendly when you try to. Are you planning on having a lot of these edit boxes? It might be better

Re: [android-developers] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-28 Thread Kostya Vasilyev
There is one: call getFirstVisiblePosition / getLastVisiblePosition, iterate over the currently visible children, and update them, matching each to the model data. There are some gotchas, like the ListView potentially being out of sync with the model data (in the middle of a layout), but