TableLayout, which consists of a TableRow with three columns. Fill in the data from the server. After filling out 10 lines, it is required to replace the top one, and the rest are shifted down and the last line is deleted accordingly (that is, the table is constantly shifted from top to bottom with the addition of a new top element). via listview and adapters.

    1 answer 1

    With TableLayout, you are unlikely to achieve this. Better implement everything through SimpleAdapter and ListView. Since you only need to scatter the data, with an adapter you will not stumble on a rake at all. When you receive a JSON array from the server, you must first check for its length more than 10 objects. If it is less, then fill the ListView as usual. Otherwise (if more than 10) - then take only the last 10 objects from the array and fill them with a ListView. This is how you will achieve the desired effect :)) I can help with the code

    • Thank you. Now I’ll try to dig out myself!) - George