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. Force Close Does Not Release Camera Resource

Indeed this is an old known issue (1578)
and only restarting the phone helps. You can try to  minimize
occurrences by properly releasing the camera yourself when an
exception occurs in your app.


2. [SHARE] Keyboard Gingerbread Bahasa Indonesia

Mo sharing ni agan" semua,keyboard Gingerbread Native Bahasa
Tinggal di pasang via recovery aja.

buat screenshot bisa liat thread gw di kaskus:
(Pake HTC Magic CM6.1)


3. Unrooting wildfire dan suksed

4. upgrade tattoo to eclair

5. Kartu smart 32-64

6. Android 3.0 Platform Preview and Updated SDK Tools

7. Gyros landscape axle inverted