這段代碼有什麼問題?我無法將選定的項目查看到第二個視圖?從微調控制器打開新的活動selectedItem
public void onItemSelected(AdapterView<?> arg0, View arg1,int arg2
, long arg3){
int Index = arg0.getSelectedItemPosition();
Toast.makeText(arg0.getContext(),
arg0.getItemAtPosition(Index).toString() + " View Selected", Toast.LENGTH_SHORT).show();
Intent newIntent = new Intent(GazaGuideSample.this, GuideCategories.class);
newIntent.putExtra("text",arg0.getItemAtPosition(Index).toString());
startActivity(newIntent);
}
您可以發佈logcat的消息,錯誤? – Style
你不能使用arg2作爲索引嗎? – user994886