ユーザーが選択した項目を表示するトースト メッセージを表示しようとしています。別のクラスからインテントとしてリストを渡し、コードが次のクラスでそれを受け取りました。
public class ListViewDelete extends ListActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.activity_list_view_delete);
final Intent intent = getIntent();
final Bundle extras = getIntent().getExtras(); //gets the GWID
final MySQLitehelper dbhelper = new MySQLitehelper(this);
ArrayList<String> thelist = new ArrayList<String>(extras.getStringArrayList(SelectOptions.EXTRA_MESSAGE));
setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,extras.getStringArrayList(SelectOptions.EXTRA_MESSAGE)));
}
public void onListItemClick(ListView parent, View view, int position, long id)
{
Toast.makeText(this, "You have selected", Toast.LENGTH_LONG).show();
}
}
最後のonListItemClickで、「選択しました」の後に、上で定義したarraylistアイテムから値を入れることができるようにカスタマイズするにはどうすればよいですか?