ListViewでXML(HttpPost)を使用して、アプリケーションのアイテムのリストを表示しています。XMLファイルは次のサンプルデータを渡します。
id=5
name=Name2
score=20
私が直面している問題は、OnItemClickにあります。
public void onItemClick(AdapterView parent、View view、int position、long id){lv.getItemAtPosition(position);
AlertDialog.Builder alert = new AlertDialog.Builder(context);
alert.setTitle("Selected Name: " + lv.getItemAtPosition(position));
ここで、lvはリストビューです。出力は次のことを示しています。
選択した名前:{id = 5、name = Name2、score = 20}
次のような出力が必要な場合はどうすればよいですか。
選択した名前:Name2
ありがとうラム