这是我的代码。我想将布尔值传递给我想要开始的活动。
private void setupUI() {
setContentView(R.layout.more_tab_activity);
listView = (ListView) findViewById(R.id.streamListView);
listView.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 , streams));
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> a, View v, int position, long id) {
//start the streamactivity
}
});
}
答案 0 :(得分:2)
你看过任何教程吗?
Intent i = new Intent(MyActivity.this, StreamActivity.class);
i.putExtra("id", true);
startActivity(i);