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
2
votes
1 answer

Tablelayout and Cursors

Is it possible to feed rows in a tablelayout from cursors? If yes, how? My cursor. cursor = db.rawQuery("SELECT _id, countryName , capitalName FROM country WHERE countryName LIKE ?",new String[] { "%" }); adapter = new SimpleCursorAdapter(this,…
Binoy Babu
  • 16,699
  • 17
  • 91
  • 134
2
votes
2 answers

Icon menu with TableView (Google+ like)

I am working on icon based main menu for my Android application (see attached image - Google+). The obvious layout for this is a TableLayout. However, I have no idea and could not find information on how to center the table itself and the icons…
Jacek
  • 1,894
  • 5
  • 21
  • 34
2
votes
0 answers

How to create 2D Table with Row and Column headers and content Scrollable on Jetpakcompose

I'm facing a logical problem in Jetapck compose, how can Ive the black bock scrolling horizontally and vertically with respectively the green and redbox. Green and red box can be considered like headers,black box like a content. So : When…
2
votes
1 answer

Android: TableLayout programmatically fill up the whole screen with equal cells

Trying to do a dynamic TableLayout in Android. In my layout there is only this:
Daniel
  • 2,318
  • 2
  • 22
  • 53
2
votes
1 answer

Android Complex Table Layout

I am new to android and try to construct this layout using TableLayout. I am not able to set columns for the second row to be column span = 2.
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
2
votes
1 answer

TableLayout vs ConstraintLayout Performance

I couldn't find anything comparing the performance of the two. Would imitating a TableLayout with a ConstraintLayout perform better than a TableLayout on its own?
2
votes
1 answer

How to automatically (when typing) expand and shrink columns of EditTexts to show all symbols?

I have following code for creating tables where people input numbers (like in excel but more more simplified) public class Table extends Fragment { private TableLayout tableLayout; private EditText[][] editTexts; private int x, y; …
2
votes
3 answers

"How to concisely implement an editable table layout"

I am new to android and i am trying to get this specific layout for a project, but i want to know if there is a easier way to this, i have added the code of the .xml file and also an image of the layout that i desire. I also did a number of query…
RBK
  • 25
  • 7
2
votes
2 answers

IllegalStateException when adding a view to a TableRow on Android

I'm currently creating an application that adds rows to an existing table. The code looks like this: TextView exampleTextView = (TextView)…
Lars
  • 523
  • 1
  • 6
  • 20
2
votes
1 answer

Android : How to create a customizable time table like structure with scrolling

In my application, I have to show a timetable as below. Where subject can be changed by clicking on the 3 dot menu and which should be updated immediately.Also, both horizontal and vertical scrolling must be possible, when user scrolls…
KJEjava48
  • 1,967
  • 7
  • 40
  • 69
2
votes
4 answers

Displaying SQLite data into TableRows

I am creating an app that would display data from my SQLite database, though I have been successful in displaying the data in Custom ListViews. But I am wondering how would I be able to display data in a Table like form, I can display the first line…
Gionne Lapuz
  • 518
  • 1
  • 9
  • 23
2
votes
2 answers

How to set Id's for list of EditText within the dynamically created TableLayout in android

I am programmatically creating a dynamic TableLayout with a mixture of TextView and EditText. This TextViews are fetched from the sqlite database of application. The last column of the TableLayout consists of the EditText whose state is set to…
Param
  • 49
  • 8
2
votes
1 answer

Use of Table Layout inside scroll view

Hello i am new in android I was trying to use scroll view and somewhere on internet i found this code
2
votes
2 answers

Nudge a button to the left

I'm very new to Android and I have the following layout xml code:
Eamorr
  • 9,872
  • 34
  • 125
  • 209
2
votes
0 answers

Tablelayout and tablerow not setting up properly

I have a code in which I have a TableLayout with one TableRow that has three textviews. When I pass data from on class to this fragment class the data doesnt show properly on the table. Also, I have horizontal Views set up which show that there size…
Ali Nasir
  • 217
  • 2
  • 12