setListAdapter(new ArrayAdapter<String>(this,R.layout.custom_list_item, r));
protected void onListItemClick(ListView list, View view, int position, long id) {
super.onListItemClick(list, view, position, id);
fname=r.get(position);
上記のコードは、配列アダプターからも位置と名前を取得しました
同様に、これらすべてを取得する必要がありますコンテキストメニューの値はどうすれば取得できますか
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
menu.setHeaderTitle("Playlist Option");
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.context_menu, menu);
}
public boolean onContextItemSelected(MenuItem item) {
// here I select the particular list value, that the value position I need that is only I delete that position from server. what are the data i fetch here? and its possible to get position from array list?
}