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. 3d engine advices


I've some background in 3d desktop programming. I've also developed some 2d
games on android. I'll start 3d programming in android. I think using an
engine would be better rather than using opengl directly. Do you mind
sharing your experiences on 3d engines?

These are some engines I've found:


Especially the last ones are very primitive. Some of you may suggest unity
but my impression is that it is more appropriate for designers who know some
coding rather than {*filter*} programmers. I also want something in java.

I've used opengl and jmonkey on desktop before. One of the main contributors
of the jmonkey started to a new engine, ardor3d. It seemed promising at
first but then they got slow. It has been more than a year they started
working on android but still there is not even a tutorial about how to
start. I was planning to use it at first but I started to change my mind. I
think it would be better to ask here first.

I am aware that I didn't ask for specific features about 3d engine
comparison but I think any comments would be helpful. When I searched
through the old group messages I couldn't come up with many topics related
with 3d engines.




2. Tablet Yg Paling Nyaman Dipakai (Was: WTI: ViewPad Siap Perang Harga)

Buat pakai2 standar menurut saya nggak perlu dual core & tegra. Yg penting 
Tablet terasa snappy, responsif, nggak ngelag, daaaan... nyaman dipegang & 
dibawa! Coba rasakan sendiri main2 GTab dan iPad2 15-30 menit saja. Setelah itu 
coba pad-pad yg lain.

Bbrp hari pakai iPad2 terasa sekali nyamannya instant email, instant browsing, 
youtubing, ngewiki, dll. Ukuran iPad2 jauh lebih bongsor dari GTab....maka jadi 
kepingin banget minang GTab atau berharap segera ada iPad 7".



3. How to Stop background music, whenever my Application is launched

4. Paging user Fascinate

5. God's work must be done in God's way

6. [WTHelp] Lupa Pattern G-Tab

7. Read sent sms in inbox with 10 min interval