Android IDE (AIDE) Support Forum

How to set /change image on custom listView from menu

how to set / change image on custom listView by onMenuItemSelected method …
plz tell me how can i do this?

  @Override
public boolean onMenuItemSelected(int featureId, MenuItem item)
{
	switch(item.getItemId()){
		case R.id.changeIMG:
			LayoutInflater inflater =(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);   
			View view = inflater.inflate(R.layout.list_options ,null);
			final ImageView img=(ImageView)view.findViewById(R.id.listoptionsIMG);   
			img.setImageResource(R.drawable.ic_launcher);
	}
	return super.onMenuItemSelected(featureId, item);
}

Try asking questions about codes on stackoverflow website. This is a coding encyclopedia.
P.S. Search the website for an answer before asking.