Hi,
Thanks for your help, I got some idea.
But here I am trying to make use of the following XML,

<TableLayout xmlns:android="http://schemas.android.com/apk/res/
android"

    android:layout_width="200dip"
    android:layout_height="200dip">

<TableRow>
    <TextView android:id="@+id/text1"
        android:layout_width="wrap_content"
                android:textSize="20dip"
        android:layout_height="wrap_content" />
</TableRow>
<TableRow android:gravity="left">

    <TextView android:id="@+id/text2"
        android:layout_width="250dip"
        android:layout_height="wrap_content" />
    <ImageView android:id="@+id/icon2"
            android:gravity="left"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
    <ImageView android:id="@+id/icon3"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />

</TableRow>
<TableRow >
    <ImageView android:id="@+id/icon1"
                android:layout_gravity="left"
                android:padding="2dip"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />
</TableRow>

</TableLayout>


If possible can you help me how to write code equivalent to this XML??

Thanks in Advance,
Muthu Kumar K.


On Feb 4, 6:25 am, Emmanuel <[email protected]> wrote:
> Should MainLayout be the layout you want to add your Table Layout in,
> and MyActivity, your activity ( odds are great that this one is simply
> 'this' ) :
>
> TableLayout curTable = new TableLayout( MyActivity);
> for (int i = 0; i < mNbRows; i++)
> {
>         TableRow CurRow = new TableRow( MyActivity );
>         for (int j = 0; j < mNbColumns; j++)
>         {
>                 // Add your content in your curRow here
>                 // for instance for a button :
>                 Button CurButton = new Button( MyActivity );
>                 CurRow.addView(CurButton);
>         }
>         curTable.addView( CurRow );}
>
> MainLayout.addView ( curTable );
>
> Emmanuelhttp://androidblogger.blogspot.com/
>
> On Feb 3, 8:26 am, "Muthu Kumar K." <[email protected]> wrote:
>
> > Hi all,
> > Can any one help me how to create table layout with out using the
> > Android XML.
>
> > Thanks in Advance,
> > Muthu Kumar K.
>
>
--~--~---------~--~----~------------~-------~--~----~
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