There is an NxN matrix, and I need to fill it in descending order in a spiral from the first element (the numbers containing “6” are not displayed) Example: 
How can I fill such a table in Android, if each element should be displayed in a spiral after a short delay? What should I use? The only solution I could think of so far is to programmatically create a TextView in a loop and transfer the value of the number that the matrix element should fill into the setText () method and place it under the previous TextView — if we go down, to the right of the previous — if we go to the right and so on But something tells me that there must be a more beautiful and correct way to do it.
The matrix can be N = 0 to 1000 (matrix size: NxN) - how to implement such a large matrix on the screen of a smartphone? Maybe use ScrollView in both directions or some scaling?