On Thursday, January 13, 2011 11:54:26 AM UTC+1, Mattias Svala wrote:
>
> I guess that this means that addView is not supported int the parent object 
> sent to getView(). I just want to double check that I'm not supposed to try 
> to attach my views to the parent ViewGroup in this case. If that is the 
> case, won't I loose out on inheriting layout parameter and such if I use a 
> call like this?
>
>         TextView view = (TextView)inflater.inflate(R.layout.notes_row, 
> null);
>
>
In case someone else runs into this:

It turns out that when I inflate the view with a call like this the layout 
parameters that I have set in the XML file does not have any effect. I had 
to a call like this for the layout parameters to be respected:

        TextView view = (TextView)inflater.inflate(R.layout.notes_row, 
parent, false);

See the relevant 
docs<http://developer.android.com/reference/android/view/LayoutInflater.html#inflate(int,
 
android.view.ViewGroup, boolean)>.

:.:: mattias

-- 
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