Re: ArrayAdapter
Try to strip out everything you can and still reproduce the problem you
are asking about, and then paste into an article *exactly* the code for
which you want help.
Patricia
OK - here's the revision
public class controller extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Context currentContext = this;
final BlinkAPI blinkAPI = new BlinkAPI(currentContext);
ListView lvRadio = (ListView)findViewById(R.id.ListViewRadio);
}
...
}
//Everything below is in a separate file
public class BlinkAPI
{
private static Context mContext;
static ListView radioLV;
static ArrayList<String> radioTitleArrayList = new ArrayList<String>();
public BlinkAPI( Context ctx)
{
BlinkAPI.mContext = ctx;
radioLV = (ListView )((Activity)
mContext).findViewById(R.id.ListViewRadio);
}
private static void updateRadioTitles( )
{
ArrayAdapter<String> radioTitleAdapter = new
ArrayAdapter<String>(mContext,
android.R.layout.simple_expandable_list_item_1,radioTitleArrayList);
...//Get titleStr etc
radioTitleAdapter.add(titleStr);
radioTitleAdapter.notifyDataSetChanged();
}
}
--
Dirk
http://www.neopax.com/technomage/ - My new book - Magick and Technology