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

Getting ID of dynamically added Views

How to get the id of dynamically added views? I want to add buttons to HorizontalScrollview in button click but limit it to three or four rows, then it will create new TableLayout for another three - four rows repeatedly like below - How can I…
-1
votes
1 answer

Android force quitting

I'm running this code and the emulator is posting a force quit. Does anyone know what could be wrong? TableLayout tl = (TableLayout)findViewById(R.id.tableLayout1); TableRow tr = new TableRow(this); tr.setLayoutParams(new…
locoboy
  • 38,002
  • 70
  • 184
  • 260
-1
votes
2 answers

TableLayout crushes button

I'm experiencing a strange issue with a TableLayout next to a Button. This is the XML:
-1
votes
1 answer

How to a build Table with 2 Columns with different amount of Rows in each Column?

I have a class Selfportrait with 2 String[] or ArrayList (Strengths and Weaknesses) and each with different amount of data. I need to fill the table. Here is the picture example: I can make a table with ListView with 2 TextView objects, fill them…
-1
votes
1 answer

Issue in Android Dynamic TableLayout

I'm using TableLayout. TableRows are dynamically added from the JSON parsing. I'm using Volley method for JSON Parsing. My problem is when I run the app at first time table rows are created. If I back to the tablelayout activity or redirect to the…
-1
votes
2 answers

Button not getting proper width android

I have a TableLayout with rows containing Button. I want all the buttons to be of the same width but they act like their width is match_parent when they are rendered even though I've given them a specific width. They are not handled anywhere in…
mrid
  • 5,782
  • 5
  • 28
  • 71
-1
votes
1 answer

How to create Dynamic table for Computing frequencies and percentage in Android Studio?

I want to create an android application that will generate a result for a statistical treatment The figure 1 in the image will be the initial table that the user will see in my application; it only contains one row with three columns, and then if…
Tonyo
  • 1
  • 1
-1
votes
3 answers

Why is my device not showing the table?

I am new to Android. I am trying to show a scrollable table. The XML visualizer on Android Studio shows it fine, but my device is not showing it. In my device, I can only see the first TextView(routine_heading). What should I do to overcome this…
-1
votes
1 answer

How to add n number of rows in TableLayout at at runtime in android

I just need your help. I want to develop an application which includes TableLayout and also i want to add n number of rows at run time. i have tried searching many stuffs, could'nt find the possible way. So anyone can help or provide any reference..…
PraKi
  • 13
  • 6
-1
votes
2 answers

Special Characters in table name in sqlite database

I am creating an android application where tables are created dynamically having email (for example:abcd@efg.com) as their table name. Later I learned that table names cannot have special characters like "@". Please suggest me a way by which I can…
Tony Mathew
  • 880
  • 1
  • 12
  • 35
-1
votes
2 answers

Put text at the right end of the row

i have a CardView which has a table layout inside. In my table layout, i want a text view to appear on the right end of the row. my xml
-1
votes
2 answers

Last button in Android table is displayed half

I have the layout below. It is dynamically loaded but sometimes, if the button text is too big, the last button btCapital9 is only half displayed. Only this button, and only in some cases. Any ideas why?
-1
votes
1 answer

Select only one table row and Deselect others

I have a table layout with table rows being added dynamically from the database. I need to programmatically choose only one table row and deselect the previous choosen. Similar to a listview onItemClick. For some reasons I can't use a ListView.
AnupamChugh
  • 1,779
  • 1
  • 25
  • 36
-1
votes
2 answers

Dynamic buttons in table layout adding Horizontally

I'm trying to add buttons in Table layout. Initially I will have a single row with a single button. When the user clicks that button, It should create 2 dynamic buttons in the next row 'Horizontally'. But with my code, I'm getting vertically dynamic…
-1
votes
1 answer

Is it possible to convert a table row into string in Android?

I am developing my first Android app. I have a table layout in my app, which will add rows dynamically. But, I want to convert the table rows into string. I tried "row.toString()" but I am not getting the expected result. Please find the following…
Shabeeralimsn
  • 797
  • 4
  • 11
  • 32