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
2 answers

addView() method throwing Nullpointer Exception

I am trying to instantiate a row of Buttons Programatically using Table Layout public class MainActivity extends Activity { /** Called when the activity is first created. */ private final int gridSize = 3; private TableRow rowArr[] = new…
tr_quest
  • 735
  • 2
  • 10
  • 24
-1
votes
1 answer

How can I create a layout that spans multiple rows using Android TableLayout?

How would I go about creating the following layout using tablelayout? Column spanning is straightforward, but I haven't found any clear guidance on row spanning.
Mattia
  • 47
  • 1
  • 9
-1
votes
2 answers

Android table layout starts from the edge of the phone

I'm using table layout to show some data but the table starts from the edge of the phone from left to right. How do i do if i want the entire table at the center and some space on right and left. Please advice. Below is my code. Code
chinna_82
  • 6,353
  • 17
  • 79
  • 134
-1
votes
1 answer

How do I achieve this table layout design?

I want to design a table layout which is given in this pages http://ashadegreener.co.uk/androidK/agenda.php (Not the menus on the right side & the header with logout button) Only the full table layout design which is given in the left side. This…
Iam4fun
  • 1,438
  • 3
  • 14
  • 18
-1
votes
3 answers

Android TableLayout Alignment

I have Layout XML Like this. This is inside LinearLayout.
Kevin Rave
  • 13,876
  • 35
  • 109
  • 173
-1
votes
1 answer

How to fire two listeners on the tablelayout by one click: tablerow and its cell

By using TableLayout I created a simple table and added OnClick listeners to both the table rows and the rows' individual cells. However, touching any cell executes only the cell listener and TableRow listener isn't called. How can I get both of…
HJS
  • 21
-2
votes
1 answer

Dark theme not showing table values in my Android app

My Android app works well when the device is in light mode but when changed the dark mode, the table values no longer show. What may be wrong please?
-2
votes
1 answer

How to add data to a table layout with checkbox in Xamarin android

How to add data to a table layout with checkbox in Xamarin android. sample like below:
-2
votes
1 answer

add 5 columns table row layout in android studio

I have application in the android. The interfaces depend on tablelayout, each row in which the content differs from the other. I want to show 5 columns in some rows ... how can that be?
-2
votes
1 answer

How can I use TableLayout with WRAP_CONTENT?

I'm having a hard time getting wrap_content to work with TableLayout. Here is the XML:
-2
votes
1 answer

Making an 8x8 Grid in Android

I'm trying to make a game of connect 4 for an android app! I want to make an 8x8 image view but whenever I try to make it (with GridLayout, GridView, or TableLayout), it only shows me up to 4 image views per column. What do I do? I'm kinda desperate…
-2
votes
1 answer

How to link tablerow content to checkbox?

Imagine I have checkbox with criteria in main activity and table in second activity. I want to link table to checkbox so for example when price and mileage is checked, only price and mileage columns are displayed. But when nothing is checked table…
-2
votes
3 answers

How to solve this Logcat error java.lang.ArithmeticException: divide by zero in android

I have been working for dynamically creating table layout but I got log error in my code java.lang.ArithmeticException: divide by zero. Code.Where I got error couldn't trigger out from logcat. public void servershopimagesoffline() { String…
-2
votes
2 answers

How to display the table with its rows which scrolls horizontally and vertically with first Column being fixed?

I want to have a table like structure which contains header row and data rows. First column should be fixed,While Other Columns should be horizontally scrollable.Similarly data rows should also be vertically scrollable.How to achieve this in…
Rakesh
  • 14,997
  • 13
  • 42
  • 62
-2
votes
1 answer

customize TabView design in android

I want to design a tab view looks like this any example?? I know how to make a tab view using this **Ans **LINK****
A J
  • 4,542
  • 5
  • 50
  • 80
1 2 3
81
82