The loop should append the text, instead of resetting it at each iteration:
String text="";
for(int[] i: matriz)
{
Arrays.sort(i);
text+=Arrays.toString(i)+" ";
}
if (!text.isEmpty())
txtMenor.setText(text.subString(0,text.length()-1));
Contrary order, just flip it after:
Collections.reverse(Arrays.asList(matriz));
txtX.setText(Arrays.deepToString(matriz));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…