Android TableLayout with pagination: Problem When click the Next/previous TableLayout need to reset

此生再无相见时 提交于 2019-12-04 17:04:54

I think you should try it like this,

productList = all products from db

Show the required products on first page in TableLayout

Now, on Next Button...

Clear TableLayout

int count=table.getChildCount();
     for(int i=0;i<count;i++)
         table.removeView(layout.getChildAt(i));

or

 table.removeAllViews();

show the next products from the productList. (you will be having here initil and end)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!