Here is the part of the code:
I am trying to set different background image based on another text view 
field. How to access another text view content in *setViewValue*?
Many thanks!

protected void onPostExecute(Voucher result) {
 final ListAdapter adapter = new SimpleAdapter(list.getContext(), 
displaylist,
          R.layout.list_item,
                   new String[] {"text1", "text2", "button1"}, new int[] {
                          R.id.text1, R.id.text2, R.id.button1});
          ((SimpleAdapter) adapter).setViewBinder(new 
SimpleAdapter.ViewBinder() {

            public boolean setViewValue(final View view, Object data, 
String textRepresentation) {
                if(view.getId() == R.id.text1) {
                   //do something here
                                                          TextView x 
=(TextView) view;
                                                          
 x.setText(data.toString());
return true;
                }
                if(view.getId() == R.id.button1)
                {
                 
*                                      //???How to set image background 
based on Text field "text1"'s value?    *
* *                                         ImageButton ib = (ImageButton) 
view.findViewById(R.id.button1);
                                  *              //How to access the text 
content of text1 here?*
                 
                }

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to