nice job.

Kris

On Tue, Mar 29, 2011 at 7:34 PM, jaafar zbeiba <[email protected]
> wrote:

> here is my class but I placed or subliste exactly
>
> public class List extends Activity {
>
>     private ListView maListViewPerso;
>
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.liste);
>
>
>         maListViewPerso = (ListView) findViewById(R.id.listviewperso);
>
>
>         ArrayList<HashMap<String, String>> listItem = new
> ArrayList<HashMap<String, String>>();
>
>
>         HashMap<String, String> map;
>
>
>         map = new HashMap<String, String>();
>
>         map.put("titre", "compte");
>
>
>
>         listItem.add(map);
>
>
>
>         map = new HashMap<String, String>();
>         map.put("titre", "opération");
>         map.put("description", "les opérations ");
>
>         listItem.add(map);
>
>         map = new HashMap<String, String>();
>         map.put("titre", "suvui ");
>         map.put("description", "suvui de compte ");
>
>         listItem.add(map);
>
>
>
>
>         SimpleAdapter mSchedule = new SimpleAdapter (this.getBaseContext(),
> listItem, R.layout.affichageitem,
>                new String[] {"img", "titre", "description"}, new int[]
> {R.id.img, R.id.titre, R.id.description});
>
>
>         maListViewPerso.setAdapter(mSchedule);
>
>
>         maListViewPerso.setOnItemClickListener(new OnItemClickListener() {
>             @Override
>             @SuppressWarnings("unchecked")
>              public void onItemClick(AdapterView<?> a, View v, int
> position, long id) {
>
>                 HashMap<String, String> map = (HashMap<String, String>)
> maListViewPerso.getItemAtPosition(position);
>
>                 AlertDialog.Builder adb = new
> AlertDialog.Builder(Tutoriel5_Android.this);
>
>                 adb.setTitle("Sélection Item");
>
>                 adb.setMessage("Votre choix : "+map.get("titre"));
>
>                 adb.setPositiveButton("Ok", null);
>
>                 adb.show();
>             }
>          });
>
>     }
> }
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to