0
在下面的代碼中,我從數據庫中獲得了該值並顯示在微調器中。並且單擊微調器中的值時必須顯示一些數據,但是我的問題是僅顯示數據的最後一行。如果你幫助我,我會很高興。想要在調用函數後能夠看到完整的數據
SpSites.setOnItemSelectedListener(新OnItemSelectedListener(){
public void onItemSelected(AdapterView<?> arg0, View arg1,int arg2, long arg3) {
Object itemName = SpSites.getSelectedItem();
String strselectedName = itemName.toString();
for(int i = 0; i < siteName.length; i++){
if(siteName[i].equalsIgnoreCase(strselectedName)){
detailEmployee = gd.selectPhoneDirectory(siteId[i]);//detailEmployee is string array
//Toast.makeText(Directory.this,detailEmployee[i], Toast.LENGTH_LONG).show();
}
for(int j = 0;j<detailEmployee.length;j++){
Toast.makeText(Directory.this,detailEmployee[j], Toast.LENGTH_LONG).show();
System.out.println("Data :"+detailEmployee[j]);
}
}
}
沒有得到你... –
多個麪包對話框,所有相同的地方 –
它沒有解決我的問題 –