LOGCAT : http://www.hostingpics.net/viewer.php?id=458098img.png
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 public View getView(int position, View convertView, ViewGroup parent) { int sectionnum = 0; c.moveToPosition(position); Log.d("test",c.getString(1)); Log.d("test2",String.valueOf(c.getCount())); for(Object section : this.sections.keySet()) { Log.d("test","CHECK !"); Adapter adapter = sections.get(section); int size = adapter.getCount() + 1; // Récupération de la position dans la section if(position == 0) { View view = headers.getView(sectionnum, convertView, parent); return view; } if(position < size) { View view = adapter.getView(position - 1, convertView, parent); cadreCouleur = ((RelativeLayout)view.findViewById(R.id.cadreCouleur)); if(c.getString(9).equals("null") && c.getString(10).equals("null")) { cadreCouleur.setBackgroundColor(android.graphics.Color.WHITE); } else if(!(c.getString(9).equals("null")) && c.getString(10).equals("null")) { cadreCouleur.setBackgroundColor(android.graphics.Color.parseColor("#F99DA6")); } else if(!(c.getString(9).equals("null")) && !(c.getString(10).equals("null"))) { cadreCouleur.setBackgroundColor(android.graphics.Color.parseColor("#A4F7A4")); } cadreCouleur.setBackgroundColor(android.graphics.Color.parseColor("#F99DA6")); return view; } // otherwise jump into next section position -= size; sectionnum++; } return null; }
C'est a cause des catégorie que j'ai des lignes ou les check se multiplie ??
Organisation de la fenêtre :
-----Categorie-----
element
element
-----Categorie-----
element
-----Categorie-----
element
-----Categorie-----
element
element
-----Categorie-----
element
-----Categorie-----
-----Categorie-----
Partager