thanks for the response.

i'm effectively calling contactView.findViewById(), as the call is 
from ContactView itself.

i tried the suggested inflate() usage, no change on the behaviour 
though. ContactView still claims it has no children, and therefore 
findViewById (contact_top_layout) doesn't find anything.




>What Mark said. Also, the correct usage of inflate() in adapters is:
>
>inflate(layoutId, parent, false);
>
>Passing the parent (given to you as a parameter in getView()) allows
>the UI toolkit to create the appropriate LayoutParams object. Passing
>false tells the toolkit to NOT call parent.addView(theInflateChild),
>since ListView will do its own magic later on.
>
>On Mon, Sep 28, 2009 at 2:11 PM, Mark Murphy <mmur...@commonsware.com> wrote:
>>
>>  Jason Proctor wrote:
>>>  i thought by now you could read my mind :-)
>>>
>>>  assuming that the XML enclosed in the post is in 
>>>res/layout/contact_view.xml
>>>
>>>  in the custom ListView...
>>>
>>>  LayoutInflater        inflater = LayoutInflater.from (this.context);
>>>
>>>  // passing null here, as i'm assuming that the ListView will hook the
>>>  view up with its hierarchy
>>>  ContactView   contactView = (ContactView) inflater.inflate
>>>  (R.layout.contact_view, null);
>>>
>>>  in the custom item View...
>>>
>>>  LinearLayout  top = (LinearLayout) findViewById (R.id.contact_top_layout);
>>
>>  Try contactView.findViewById().
>>
>>  --
>>  Mark Murphy (a Commons Guy)
>>  http://commonsware.com | http://twitter.com/commonsguy
>>
>>  Android Development Wiki: http://wiki.andmob.org
>>
>>  >
>>
>
>
>
>--
>Romain Guy
>Android framework engineer
>romain...@android.com
>
>Note: please don't send private questions to me, as I don't have time
>to provide private support.  All such questions should be posted on
>public forums, where I and others can see and answer them
>
>

-- 
jason.vp.engineering.particle

--~--~---------~--~----~------------~-------~--~----~
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 unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to