Exactly but the issue is that my app strictly must declare the UI only in
javacode, then the problem is that I can not access the elements created
dynamically by their id, if i do: LinearLayout ll =
findViewById(R.id.layoutSpinner); ll is null.

If you know other way of access the elements created dynamically i'll  be
grateful

2011/7/8 TreKing <[email protected]>

> On Fri, Jul 8, 2011 at 11:09 AM, Raúl Do Santos 
> <[email protected]>wrote:
>
>> when i create an arrayadapter, like this:
>>
>> ArrayAdapter<entity> adapter = new ArrayAdapter<entity> ( this,
>> R.id.layoutSpinner, R.id.item, list);
>>
>> R.id.layoutSpinner and R.id.item are declarated within strings.xml, but
>> are instatiated dinammically and setted ids like this:
>> LinearLayout layoutSpinner = new LinearLayout ();
>> layoutSpinner.setId(R.id.layoutSpinner);
>>
>
> I believe R.id.layoutSpinner should refer to an XML layout that will
> populate a list.
> R.id.item should refer to the ID of a TextView within R.id.layoutSpinner
> that will be filled with the text information coming from the items in the
> list.
>
> Defining either of these in strings.xml doesn't make sense.
>
> What are you actually trying to do?
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> 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 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