Tirolel Tirolel - 1 year ago 122
Android Question

Limit tablelayout rows, android

I was wondering if it's possible to add a limit such as maximum of row/s to the tablelayout?

So I can, let's say, insert or show only last 100 instead of entire view. The data is dynamically populated and inserted.


int _tableCount = _tableLayout.getChildCount();
if(_tableCount > 100)

Answer Source

You can check count of rows by getChildCount() method, and add rows only if count is less than 100.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download