Там нет вида по умолчанию или виджета, чтобы сделать это, я думаю. Вы можете попробовать с ListView или делать представления программно (однако это немного грязный )
xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/llMain"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</LinearLayout>
Активность:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//Get your main layout from the XML
LinearLayout llMain = (LinearLayout) findViewById(R.id.llMain);
ArrayList<String> alItems = new ArrayList<String>();
//Put some example data
alItems.add("Text1");
alItems.add("Text2");
alItems.add("Text3");
for(int i=0; i<alItems.size(); i++){
//We create a Layout for every item
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.HORIZONTAL);
//A TextView to put the order (ie: 1.)
TextView tv1 = new TextView(this);
tv1.setText(i+1 + ". ");
ll.addView(tv1, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0));
//TextView to put the value from the ArrayList
TextView tv2 = new TextView(this);
tv2.setText(alItems.get(i));
ll.addView(tv2, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1));
//Add this layout to the main layout of the XML
llMain.addView(ll, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 0));
}
}