A table with an "infinite" number of rows would be better implemented
as a ListView.

On Sat, May 2, 2009 at 11:29 AM, Mark Murphy <[email protected]> wrote:
>
> Raja Nagendra Kumar wrote:
>> We have a table which may have infinite rows.
>
> Unless you have a device with infinite RAM, your table will have finite
> rows.
>
>> Would it be possible to
>> create row by using the xml template say
>>
>> <TableRow>
>>           <EditText android:id="@+id/tbRelation"
>>                     android:layout_width="wrap_content"
>>                     android:layout_height="wrap_content"
>>                     android:singleLine="true"
>>                     android:scrollHorizontally="true"
>>                     android:textSize="20sp"/>
>>           <Button android:id="@+id/bRelationQuery"
>>                   style="?android:attr/buttonStyleSmall"
>>                   android:layout_width="wrap_content"
>>                   android:layout_height="wrap_content"
>>                   android:text="@string/blQuery"/>
>>       </TableRow>
>>
>>
>> some thing similar to clone of existing row but with different id's
>> etc.
>
> Yes and no.
>
> Yes, you should be able to inflate an XML file for a TableRow and use
> addView() or something to append it to a TableLayout.
>
> No, by default, each inflated row's elements will have the same IDs as
> those in every other row. You would need to call setId() on each View
> that needs its own ID, supplying some unique value.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
>
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

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

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