How to display border lines for TableLayout

by neuzou » Fri, 13 Mar 2009 17:18:31 GMT

Sponsored Links
   everybody, Android developer guide mention "TableLayout containers
do not display border lines for their rows, columns, or cells." But we
have a requirement to display the border on UI, there is no attribute
to enable the border in TableLayout.
how can I do it, anybody can give me some suggestion?


How to display border lines for TableLayout

by Romain Guy » Fri, 13 Mar 2009 23:39:35 GMT

 TableLayout is, as its name suggests, a layout. Nothing more. It's not
a table widget. If you want borders, you'll have to draw them with the
widgets you put in the tablelayout's cells.

Romain Guy
Android framework engineer

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


Sponsored Links

How to display border lines for TableLayout

by Taenam,Kim » Sat, 14 Mar 2009 02:10:24 GMT

 Hi there,
How about making a custom ViewGroup that extends TableLayout then
override the paint method.
In the overrided method
  1. you may get all of views in the layout to get view's bounds area
  2. draw rectangle to express the border of view

I didn't try this, but it makes sense.


Other Threads

1. to unsubscribe android group

Hi ,
      please unsubscribe the unsubscribe the android begginners group.


2. Work Email for Android

I just got the new android phone from t-mobile and I'm trying to set
up the Work Email 1.0.0024 (changelist 46752) to sync with my firms
exchange server. I have all the required info (and have done this with
my Apple iTouch successfully) but it won't let me sync. I get "Error
Failed to create the account. Please try again later". I think this
may have something to do with the fact that the Work Mail doesn't
require a PIN. Is there any work around or something I can do? I've
downloaded and app to get my work email, but would prefer to use the
app that came with the phone.


3. Zoom of android

4. how can i refresh my adapter

5. Our app force closes on 1.6, Is SDK or image available yet?

6. ColorStateList creation

7. How to open or close the soft keyboard by code