public class MyActivity extends Activity {
private ListView listView;
private ScrollView scrollView;
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
listView=(ListView)findViewById(R.id.main_listView);
scrollView=(ScrollView)findViewById(R.id.main_scrollView);
ArrayList<String> datas = new ArrayList<String>();
for(int i=0;i<50;i++){
datas.add(String.valueOf(i));
}
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,datas);
listView.setAdapter(adapter);
}
}