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
10
votes
7 answers

How to set divider between columns in tablelayout?

I want to create a table with column dividers. I want to divide my columns with a vertical bar image. To achieve this I have used "android:divider="@drawable/abc" but its not working. Below is my xml file for same:
brig
  • 3,721
  • 12
  • 43
  • 61
9
votes
3 answers

Change image on Tab in TabLayout when Selected

I am using Design TabLayout,
Pankaj
  • 1,242
  • 1
  • 9
  • 21
9
votes
4 answers

Multiline textview in table row not wrapping properly

I'm trying to get my text of my text view within the table row to appear on more than one line, but for some reason it doesn't wrap properly and I end up with this (see screenshot). I know the text view has something to do this it but I don't know…
wbk727
  • 8,017
  • 12
  • 61
  • 125
8
votes
2 answers

How do android:shrinkColumns and android:stretchColumns work?

I can set android:shrinkColumns and android:stretchColumns at TableLayout. For example:
Alex Klimashevsky
  • 2,457
  • 3
  • 26
  • 58
8
votes
1 answer

What is the best way to create a data table in android?

I would like to create a table which is filled by data from DB. I know that it is possible to create a dynamic table using TableLayout but I'm not sure that it's the best solution im my case. Here is an example of what I want to create(the first…
8
votes
1 answer

Fully functional android data grid

Since building dynamic table using Table Layout was not enough for me. I wonder if I could get data grid view like this (from MyData application) The features are: vertical scrolling supported horizontal scrolling supported interactive table cells…
Abdelwahed
  • 1,694
  • 4
  • 21
  • 31
7
votes
2 answers

TableLayout - Remove space between columns

I'm having a problem with the TableLayout. First, take a look at the screenshot: As you can see, there is a pretty big space in the middle of the TableLayout. I don't know how to reduce the space in the middle, so that the TableRows will have more…
Eli Revah
  • 3,626
  • 7
  • 27
  • 33
7
votes
1 answer

How to merge row in one cell in Table Layout in android, dynamically?

how to get below functionality in android with Table Layout. As it is seen in the image, I need to merge the two cells in row #5 - column #1 and row#6 - column#1 dynamically and I have to replace one image over there. How can I achieve this? Your…
Hitesh Dhamshaniya
  • 2,886
  • 3
  • 24
  • 31
7
votes
2 answers

layout_span in TableLayout in Android

I would like to create a login screen for an android application. I'm using TableLayout to get the correct alignment. So two rows consist of a TextView and an EditText and I would like to add a Button below them that width is stretched to the…
Kiss Viktoria
  • 173
  • 2
  • 9
7
votes
1 answer

How to add editText.addTextChangedListener in TableLayout

My work environment is Eclipse heliose, Android 1.6 I have created a tableLayout with columns and rows added successfully, each cell has one textView and one EditText and I have a problem in accessing each cell and need to add addTextChangedListener…
6
votes
0 answers

Android - Styling TableLayout

Is there a way to style a TableLayout entirely ? I found [this] but I wondering if there was a way to apply the style to the table and not to the rows individually. I have a lot of tables and I don't want to apply style individually to each row. I…
Saad Farooq
  • 13,172
  • 10
  • 68
  • 94
6
votes
1 answer

how to give border for tablerow in tablelayout in android?

I need to show border around TableRow in TableLayout. How would i do that???
Sourabh
  • 5,170
  • 9
  • 30
  • 41
6
votes
1 answer

How to set number of columns in android tablelayout

I have the following code:
Scarlett
  • 131
  • 1
  • 2
  • 8
6
votes
3 answers

How to make whole activity scrollable according to the data inside it

I have tried LinearLayout inside which I put several textview. I completely use weights for each and every view. Problem arises when data becomes too much in lenght and textview not shows it completely. I also tried tabletlayout but that thing also…
6
votes
4 answers

Custom font for android.support.design.widget.TabLayout

How can i use custom font for Tablayout class belonging to android.support.design.widget package? I'm using it to implement Quick Return view functionality.
vinay vyas
  • 491
  • 1
  • 4
  • 17
1 2
3
81 82