android - Spinner and HTML select -
i have spinner displaying categories. ((string)categoryspinner.getselecteditem()))
gives category name.
the spinner initialized given below:
list<string> list = new arraylist<string>(); (int = 0; < category.length; i++) { list.add(category[i].getname()); } arrayadapter<string> dataadapter = new arrayadapter<string>(this, android.r.layout.simple_spinner_item, list); dataadapter.setdropdownviewresource( android.r.layout.simple_spinner_dropdown_item ); shoppingitemcategoryspnr.setadapter(dataadapter);
is there idea make spinner html select-tag can display category name , category id?
Comments
Post a Comment