How To 4 icons in right side of each row in list view
<p>I want to set 3 icons to right side in each row of list view .I am making shopping app in which I want to when in list view user select any product so he/she could see product in  3 way like if user will select icon 1 so  user could see product in grid view and if user select   icon 2 so user can see product in image switcher,on icon 3 user can see products in list view actually  i wana user colud see products in 3 view.when click on icons so next activity open like if user select icon of grid view so next activity will open of grid view.this is my code  </p>

<pre><code>public class ListViewSupplementActivityActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.listlayout);
ListView view = (ListView) findViewById(R.id.list);
view.setAdapter(new CustomImageListAapter(this));

view.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id) {
if(position ==0)
{    
Intent ii = new Intent(ListViewSupplementActivityActivity.this,SingleListItem.class);

ii.putExtra("operation", position);
startActivity(ii);                                                           
}
if(position ==1){    
Intent in = new Intent(ListViewSupplementActivityActivity.this,Test.class);

in.putExtra("operation", position);
startActivity(in);
}
if(position == 5){
Intent in2= new               Intent(ListViewSupplementActivityActivity.this,FullImageActivity.class);       
Bundle bundle = new Bundle();
bundle.putInt("operation", position);
in2.putExtras(bundle);   
startActivity(buse); }

}  


});
}
}
</code></pre>

<p><strong>This is custom adapter class</strong>:</p>

<pre><code>public class CustomImageListAapter extends BaseAdapter {

private int[] images = {R.drawable.autumnwalk, R.drawable.bridge,R.drawable.butterfly,               
R.drawable.cheetah, R.drawable.cloud, R.drawable.su, R.drawable.wi,
R.drawable.rocksculpture, R.drawable.skyatsunset, R.drawable.s,
R.drawable.smoke, R.drawable.tulips};

private String[] imageDesc = { "Autumn Walk", "Bridge",
"Butterfly", "Cheetah", "Cloud", "Highway", "Martini", 
"Rock Sculpture", "Sky at Sunset", "Sliced Orange", "Smoke",
"Tulips"};

private Context ctx = null;

public CustomImageListAapter(Context context) {
this.ctx = context;
}

public int getCount() {
return images.length;
}

public Object getItem(int arg0) {
return null;
}

public long getItemId(int position) {
return 0;
}
public View getView(int arg0, View arg1, ViewGroup arg2) {

ImageView imgView = new ImageView(this.ctx);
imgView.setScaleType(ScaleType.FIT_CENTER);
imgView.setPadding(8, 8, 8, 8);
imgView.setImageResource(images[arg0]);
imgView.setAdjustViewBounds(Boolean.TRUE);
imgView.setContentDescription(imageDesc[arg0]);
imgView.setMaxHeight(200);
imgView.setMaxWidth(200);

TextView tv = new TextView(this.ctx);
tv.setText(imageDesc[arg0]);
tv.setMaxHeight(100);
tv.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
tv.setGravity(Gravity.CENTER);


LinearLayout layoutView = new LinearLayout(this.ctx);
layoutView.setOrientation(LinearLayout.HORIZONTAL);
LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(150, 150);
layoutView.addView(imgView, params1);
LinearLayout.LayoutParams params2 = new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
layoutView.addView(tv, params2);

return layoutView;}

}
</code></pre>
