Sunday, January 19, 2014

 Click on an android GridView Item one on one activity (containing pictures and names),


            
How to pass the name of a TextView to AlertDialog
Reply:
Who ah?
Reply:
AlertDialog there TextView it? Photo release to see Caesar, if it is passed by value, OnClickListener can pass ah.
Reply:
reference to the second floor of the reply:
AlertDialog have TextView it? Photo release to see Caesar, if it is passed by value, OnClickListener can pass ah.

Can not reply to elaborate? I do not know who to ask this question are junior rookie class yet
Reply:
 
public void onItemClick (AdapterView arg0, View arg1, int arg2, long arg3) {
JavaBean
/ / defined; CheckMenu cm = (CheckMenu) list.get (arg2)id_d = cm.getId ();
name_d = cm.getName ();
price_d = cm.getPrice ();
AlertDialog.Builder builder = new AlertDialog.Builder (this)
. SetTitle ("Please select:")
. SetView (v)
. SetIcon (arg0.getId ())
. SetMessage (id_d + "" + name_d + "" + price_d)
.
.
.
.
.
}

Reply:
I ask you is how to solve this problem have demo can share it Thank you

No comments:

Post a Comment