Android Java: Show the value only of `uid` when a listrow is selected

mmslax2

New Member
So this is my code:\[code\]protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.merken); DatabaseStuff dbStuff = new DatabaseStuff(this); itDetails = new Intent(Merken.this, MerkDetails.class); lstMerken = (ListView) findViewById(R.id.ListViewMerken); ListAdapter adapter = new SimpleAdapter( this, dbStuff.getMerken(), R.layout.merkcell, new String[] { "name", "uid" }, new int[] { R.id.title, R.id.uid } ); lstMerken.setFastScrollEnabled(true); lstMerken.setAdapter(adapter); lstMerken.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> aV, View vW, int pos, long lng) { Log.v("YH", lstMerken.getItemAtPosition(pos).toString()); //MerkDetails.MerkUid = lstMerken.getItemAtPosition(i).toString(); //startActivity(itDetails); } });}\[/code\]The ouput that I get now is: \[code\]{name="someName", uid="187"}\[/code\]My question is how do I get to ouput only \[code\]187\[/code\], so only the value of \[code\]uid\[/code\]
 
Back
Top