Questions tagged [android-tablelayout]

The TableLayout is one of the layouts on the Android platform that arranges its children into rows and columns.

The TableLayout arranges its children into rows (the number of rows is given by the number of direct children, usually TableRows) and columns (where the number of columns is given by the TableRow with the biggest number of views in it).

Normally TableLayout consists of multiple TableRow objects, each defining a row. Each row has zero or more cells and each cell can hold one View. Cells can span over multiple columns. The width of a column is by default defined by the widest view in that column.

The TableLayout can also specify various rules to modify the way the columns use the space available to them (or even make them disappear). When using the TableLayout, care must be taken regarding the LayoutParams used as the TableLayout, which imposes some constraints on its children. More information can be found in the documentation for the TableLayout class.

This is an Android specific class, not present in JavaSE.

1224 questions
-1
votes
3 answers

How to resize a drawable from the layout

I am trying to customize the layout of a dialog. I want to have a logo in the top left corner and in the right of it, the title of the dialog. I wrote the layout below, but the editor in eclipse gives me the layout shown below, and I do not know why…
-1
votes
2 answers

Manage 10-15 columns on a single screen (Android App)

Just wondering if we can do something like this using android code (native app) or even a better method to handle multiple columns on a single screen. I have searched a lot but all I find is done through CSS & JS rather than android code
Haseeb Jadoon
  • 450
  • 6
  • 20
-1
votes
1 answer

Android why not show my tablelayout?

My app read a surveys questions and answers from file, and its create for this a dynamic table layout. And when my table layout is ready i would like to show this on the screen but its not working. I have a table layout in my activity_main.xml, and…
just
  • 1,900
  • 4
  • 25
  • 46
-1
votes
1 answer

How get TextView id from table row

I draw table top and then table body. In each table cell I have TextView, so how can I get it's id or another number, when user clicked on it? @Override protected void onCreate(Bundle savedInstanceState) { …
-1
votes
1 answer

Android: Draw a custom view programmatically

I am developing an application in which i am showing a image followed by text followed by image again horizontally in table layout. I am creating the table layout programmatically as: for(i = 0; i < arrayList.size(); i++){ /* Find Tablelayout…
Manoj Fegde
  • 4,786
  • 15
  • 50
  • 95
-1
votes
1 answer

Android TableLayout TableRow Alignment

I am using Table Layout to display data as shown below. What i want to do ? I want to align all content to the largest content. As you can see on the below picture Pilot column has the largest content. I mean what it should look like; Code:
Swisyn
  • 397
  • 1
  • 6
  • 11
-1
votes
1 answer

Issue while updating text view of a table layout inside ui thread

I have a application in which i am fetching data from server and updating the view accordingly. My code is as follows: public class NotificationActivity extends Activity{ String userid; String ordernumber; TextView txtLabelOrderNumber; …
Pankaj Khurana
  • 3,243
  • 10
  • 50
  • 79
-1
votes
2 answers

Changing background color of table row according to clicks

I have a table layout with table rows building according to data given by JSON. I want to highlight a row after pressing it but I need that only one row to be highlighted in every given time, it means that if I highlight a row and then press another…
itzick binder
  • 524
  • 10
  • 31
-1
votes
1 answer

Table Layout not refreshing properly - Android

I am developing an android application where I need the table to refresh when an event occurs. That is when a user clicks on a button, the table should now change displaying new data. So I used removeAllViews for this purpose. I will then add the…
-1
votes
1 answer

Adding setBackgroundResource(R.drawable.cell_shape)

I'm sure this is probably a simple thing to ask, but I've been scratching my head at it for a while now and don't seem to be getting anywhere. Basically I am following some examples to build a table in android, when I come to…
javawocky
  • 899
  • 2
  • 9
  • 31
-1
votes
1 answer

Tablet 10.1" layout leaves blank space on left and right

This leaves a blank space and when i insert anything in layout
Sunil
  • 13
  • 1
  • 5
-1
votes
2 answers

Android TableLayout : Stretch columns Programmatically

I am creating TableLayout, xml code of TableLayout: I want to add n no of rows dynamically…
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
-1
votes
1 answer

How can i change the render of a TableLayout depending on the dimension of its contents?

I have an ExpandableListView which is populated with some data that i retrieve from a web service. Inside a few of the child of this ExpView there are row populated by TableLayout. The problem is that i'd like to set setStretchAllColumns() to true…
-1
votes
1 answer

Increase coloumn width of android tablelayout with gesture

I want to Increase width of Android Table Layout with finger touch movement. I tried it with TouchListener and Gesture. But did not getting the exact result. Please share some idea.
-1
votes
1 answer

Is it possible to make bitmap in TextView and showing in TableLayout?

I have bitmap scaled for show in TextView but how to add in TableLayout with row and coloumn? tbl = (TableLayout)findViewById(R.id.TableLayout1); tblrow = new TableRow(this); public void bukagambar(){ bit = Bitmap.createScaledBitmap(bi,…