-3

I want to create table Layout using Listview.But the no of rows and columns are dynamically generated. So how can i create ?

for eg.) If row =2 cols=2 means list view automatically create 2 rows and 2 cols

If row =3 cols =4 means listview create 3 rows and 4 cols automatically

So what i understand is i want to create 2 listview (1 for row and other for cols) is it right ? can anyone share the sample code?

i choose listview because of the table shows with scroll bar

But my table only contains textview .

Susi
  • 1

2 Answers2

0

Bellow is the library which will help you get table view type of view

https://github.com/jondoes/TableView

Dhaval Solanki
  • 4,589
  • 1
  • 23
  • 39
  • Sorry without using any libraries i want to create a table with no of rows & cols (contains textview only with scroll bar horizondal and vertical) – Susi Jan 19 '18 at 05:34
0

You can use RecyclerView with GridLayoutManager or GridView and set number of columns programmatically.

Phong Nguyen
  • 6,897
  • 2
  • 26
  • 36
  • i am not familiar with grid view can u pls share the code which contains textview table with no of rows & cols using listview (scroll bar horizondal & vertical) – Susi Jan 19 '18 at 05:35