@Override protected void onStart() { super.onStart(); setActionBarInfo(getString(R.string.scenes_title)); this.getSupportActionBar().setDisplayHomeAsUpEnabled(true); opzioni.initializePrefs(); if (!opzioni.isDbConfigured()) { AlertDialogHelper.dbNotInitedDialog(this); } SoulissDBHelper.open(); // prendo comandi dal DB, setto adapter LinkedList<SoulissScene> goer = datasource.getScenes(SoulissClient.getAppContext()); scenesArray = new SoulissScene[goer.size()]; scenesArray = goer.toArray(scenesArray); progsAdapter = new SceneListAdapter(this, scenesArray, opzioni); // Adapter della lista listaScenesView.setAdapter(progsAdapter); listaScenesView.invalidateViews(); // ImageView nodeic = (ImageView) findViewById(R.id.scene_icon); // nodeic.setAlpha(150); mAdapter = new NavDrawerAdapter( SceneListActivity.this, R.layout.drawer_list_item, dmh.getStuff(), DrawerMenuHelper.SCENES); mDrawerList.setAdapter(mAdapter); }
@Override public void onReceive(Context context, Intent intent) { List<SoulissScene> goer = datasource.getScenes(SceneListActivity.this); scenesArray = new SoulissScene[goer.size()]; int q = 0; for (SoulissScene object : goer) { scenesArray[q++] = object; } progsAdapter = new SceneListAdapter( SceneListActivity.this.getApplicationContext(), scenesArray, opzioni); // Adapter della lista listaScenesView.setAdapter(progsAdapter); listaScenesView.invalidateViews(); }