How to display border lines for TableLayout

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


Sponsored Links
 Hi:
   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?
Thanks.

Regards
Dwyane
--~--~---------~--~----~------------~-------~--~----~



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
romain...@android.com

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. apikey for MapView

The MapView add-on sample uses an apparently dummy apikey in the
layout xml that looks like this -

       android:apiKey="apisamples"

That doesn't look like the kind of apikey you get when you register
for the Android Maps API.  The sample application is built and signed
with the debug certificate just like any other app with the SDK.  So
how does the MapView demo get around the requirement for a valid
apiKey?  I actually tried "apisamples" as the apiKey in my own app but
that didn't work - you just get a blank view with no map tiles.


--~--~---------~--~----~------------~-------~--~----~

2. Question about LocationServices issue (3453): has this been solved in Donut (1.6)?

The issue is about the location-services making the phone act very
slow because of excessive CPU consumption:
http://code.google.com/p/android/issues/detail?id=3453

Has this one been solved in Donut?

--~--~---------~--~----~------------~-------~--~----~

3. Announcement: [New project] Build and run only Dalvik

4. jar files shared by multiple apps

5. Google Android Developers Required - NJ - Telecom Giant Client

6. missing something when trying to save

7. environment set-up confusing, instructions unclear