i made this and this is the pic http://www6.0zz0.com/2010/10/12/21/748629320.png
but i can't make an action on the table this is the row.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon"></ ImageView><LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content"><TextView android:id="@+id/text1" android:textSize="16sp" android:textStyle="bold" android:layout_height="wrap_content" android:layout_width="200dip" /></ LinearLayout> <LinearLayout android:id="@+id/LinearLayout02" android:layout_width="wrap_content" android:layout_height="wrap_content"><CheckBox android:id="@+id/ CheckBox01" android:layout_width="wrap_content" android:layout_height="wrap_content"></CheckBox> </LinearLayout> and this is the code package com.sai.ui.listview; import java.util.ArrayList; import java.util.HashMap; import android.app.AlertDialog; import android.app.ListActivity; import android.os.Bundle; import android.view.View; import android.widget.ListView; import android.widget.SimpleAdapter; public class MyCustomListView extends ListActivity { private String[] m_orders = {"Swix","Dominator","Holmenkol","Rex","Rode", "Skigo","Star","Toko","Vauhti","Vola"}; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.custom_list_view); SimpleAdapter adapter = new SimpleAdapter( this, list, R.layout.custom_row_view, new String[] {"image","text","check"}, new int[] {R.id.ImageView01,R.id.text1} ); populateList(); setListAdapter(adapter); } static final ArrayList<HashMap<String,String>> list = new ArrayList<HashMap<String,String>>(); private void populateList() { HashMap<String,String> temp = new HashMap<String,String>(); temp.put("text","Swix"); temp.put("image", ""+getResources().getIdentifier("swix", "drawable", getPackageName())); list.add(temp); HashMap<String,String> temp1 = new HashMap<String,String>(); temp1.put("text","Dominator"); temp1.put("image", ""+getResources().getIdentifier("dominator", "drawable", getPackageName())); list.add(temp1); HashMap<String,String> temp2 = new HashMap<String,String>(); temp2.put("text","Holmenkol"); temp2.put("image", ""+getResources().getIdentifier("holmenkol", "drawable", getPackageName())); list.add(temp2); HashMap<String,String> temp3 = new HashMap<String,String>(); temp3.put("text","Rex"); temp3.put("image", ""+getResources().getIdentifier("rex", "drawable", getPackageName())); list.add(temp3); HashMap<String,String> temp4 = new HashMap<String,String>(); temp4.put("text","Rode"); temp4.put("image", ""+getResources().getIdentifier("rode", "drawable", getPackageName())); list.add(temp4); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { // this.m_adapter.getItem(position).click(this.getApplicationContext()); AlertDialog.Builder adb = new AlertDialog.Builder(MyCustomListView.this); adb.setTitle("LVSelectedItemExample"); adb.setMessage("Selected Item is = " + m_orders[position]); adb.setPositiveButton("Ok", null); adb.show(); } } ------------------- how can i solve this prolem ??? </LinearLayout> On Oct 12, 3:25 pm, karteek <kartee...@gmail.com> wrote: > You first declare a special layout file with all your > ImageView,TextView and checkbox. > and use that layout file while setting array adapter > > On Oct 12, 3:41 pm, Ahmed Shoeib <ahmedelsayed.sho...@gmail.com> > wrote: > > > hi all , > > > the first Question : > > ----------------------------------- > > > i tried to make this using normal listView > > and this is the pic > > >http://www8.0zz0.com/2010/10/12/10/511032679.png > > > i can't add image to it > > how i can Add image At The beginning of the listView in each Row ??? > > > the Seconed Question : > > ------------------------- > > > i tried to make the same thing using Custom ListView Using > > ArrayAdapter > > and this is the pic > > >http://www8.0zz0.com/2010/10/12/10/413507770.png > > > i can't add a checkBox at each row > > > how i can add a CheckBox At the End of each Row ? > > > --------------------- > > > or if there is any other way to do that plz tell me about it ?? > > > thanks, > > ahmed shoeib > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en