Dynamic TableLayout in Android

In this post I explain how to implement in runtime a table with rows and columns without using a XML file.
To display the borders of the TextView I use the method illustrated here.

  1. Create in Eclipse an Android Project
    in my pc I have:

    • Eclipse 3.7.1
    • Android 4.0.3
    • SDK 15
  2. modify the file res/layout/main.xml is as follows (it should be the default plus the line “android:id=”@+id/linearLayout1”)
  3. modify the main activity
  4. launch the application

The image shows the application in the emulator.

One Reply to “Dynamic TableLayout in Android”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.