D
Dirk Bruere at NeoPax
I'm guessing this time it's the latter.
This didn't end with a period which is uncharacteristic for the OP. I
think his newsreader just failed, is all.
To the OP: bits like these below:
won't ever compile. Please remove the ...'s and post code that does
compile, or at least shows what error with the compiler you are actually
having.
Those dots are just all the other methods and code to generate titleStr.
The code I have just posted loads the title strings into the
ArrayAdapter OK. The problem occurs HERE
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);
String titleStr="hello";
radioTitleAdapter.add(titleStr);
radioLV.setAdapter(radioTitleAdapter); //HERE - the
debugger splashes up "source not found"
radioTitleAdapter.notifyDataSetChanged();
}
}