Hi all,

My code is following
class MyAdapter extends View{
 public MyAdapter(Context context,
                                ContactPerso contact) {
                 super( context );
                 inflate(context, R.layout.myadaptercontact, null);


                 
((TextView)findViewById(R.id.txtViewName)).setText(contact.name);


         }
}
myadaptercontaxt is an xml file containing a LinearLayout and 3
textField (including txtViewName)

My code crashes when I try to access to txtViewName, as if the layout
was not loaded.

What I need to put more after inflate to work with my new view?

Regards and thanks for your help.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to