Android examples for User Interface:View
populate View with Adapter
//package com.java2s; import android.view.ViewGroup; import android.widget.Adapter; public class Main { public static void populateView(ViewGroup viewGroup, Adapter adapter) { for (int position = 0; position < adapter.getCount(); position++) { viewGroup.addView(adapter.getView(position, null, viewGroup)); }// w ww .ja va2s . c om } }