Bonjour à toutes et à tous,

Je vous expose mon problème.
Je débute en Android et je développe une appli perso pour mon boulot.

Dans une de mes activités (je calcule automatiquement le score d'apgar en cliquant sur les items), j'ai un souci d'affichage.
En effet, certains item sont trop longs et sont donc coupés.
Comment faire pour afficher sur 2 lignes???

Voici le code java:
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
package app.reaped;
 
import java.util.ArrayList;
import java.util.List;
 
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
 
public class Apgar extends Activity {
	private Spinner liste1 = null;
	private Spinner liste2 = null;
	private Spinner liste3 = null;
	private Spinner liste4 = null;
	private Spinner liste5 = null;
 
	int fc = 0;
	int mvts_respi = 0;
	int tonus = 0;
	int stimul = 0;
	int color = 0;
	int score = 0;
 
	Button calcul = null;
	Button raz = null;
 
	TextView resultat = null;
 
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.apgar);
 
		calcul = (Button)findViewById(R.id.score);
		raz = (Button)findViewById(R.id.raz);
 
		resultat = (TextView)findViewById(R.id.result);
 
 
		liste1 = (Spinner)findViewById(R.id.spinner1);
		List<String> exemple1 = new ArrayList<String>();
		exemple1.add("0 : Absents");
		exemple1.add("1 : <100/min");
		exemple1.add("2 : >100/min");
 
		ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, exemple1);
		adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
			liste1.setAdapter(adapter1);
 
		liste1.setOnItemSelectedListener(new OnItemSelectedListener(){
 
			@Override
			public void onItemSelected(AdapterView<?> parent, View v, int pos, long id) {
				String item1 = (String)parent.getItemAtPosition(pos);
 
				if (item1.equals("0 : Absents")) fc = 0;
				if (item1.equals("1 : <100/min")) fc = 1;
				if (item1.equals("2 : >100/min")) fc = 2;
 
			}
 
			@Override
			public void onNothingSelected(AdapterView<?> arg0) {
 
			}
 
		});
 
 
		liste2 = (Spinner)findViewById(R.id.spinner2);
		List<String> exemple2 = new ArrayList<String>();
		exemple2.add("0 : Absents");
		exemple2.add("1 : Lents, irréguliers");
		exemple2.add("2 : Réguliers avec cri vigoureux");
 
		ArrayAdapter<String> adapter2 = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, exemple2);
		adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
			liste2.setAdapter(adapter2);
 
		liste2.setOnItemSelectedListener(new OnItemSelectedListener () {
 
			@Override
			public void onItemSelected(AdapterView<?> parent, View v, int pos, long id) {
				String item2 = (String)parent.getItemAtPosition(pos);
 
				if (item2.equals("0 : Absents")) mvts_respi = 0;
				if (item2.equals("1 : Lents, irréguliers")) mvts_respi = 1;
				if (item2.equals("2 : Réguliers avec cri vigoureux")) mvts_respi = 2;
 
			}
 
			@Override
			public void onNothingSelected(AdapterView<?> arg0) {
 
			}
 
		});
 
 
		liste3 = (Spinner)findViewById(R.id.spinner3);
		List<String> exemple3 = new ArrayList<String>();
		exemple3.add("0 : Nul, flasque");
		exemple3.add("1 : Faible (légère flexion des extrémités)");
		exemple3.add("2 : Fort (quadri-flexion, mvts actifs)");
 
		ArrayAdapter<String> adapter3 = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, exemple3);
		adapter3.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
			liste3.setAdapter(adapter3);
 
		liste3.setOnItemSelectedListener(new OnItemSelectedListener() {
 
			@Override
			public void onItemSelected(AdapterView<?> parent, View v, int pos, long id) {
				String item3 = (String)parent.getItemAtPosition(pos);
 
				if (item3.equals("0 : Nul, flasque")) tonus = 0;
				if (item3.equals("1 : Faible (légère flexion des extrémités)")) tonus = 1;
				if (item3.equals("2 : Fort (quadri-flexion, mvts actifs)")) tonus = 2;
			}
 
			@Override
			public void onNothingSelected(AdapterView<?> arg0) {
 
			}
 
		});
 
 
		liste4 = (Spinner)findViewById(R.id.spinner4);
		List<String> exemple4 = new ArrayList<String>();
		exemple4.add("0 : Nulle");
		exemple4.add("1 : Faible (léger mvt, grimace)");
		exemple4.add("2 : Vive (cri, toux)");
 
		ArrayAdapter<String> adapter4 = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, exemple4);
		adapter4.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
			liste4.setAdapter(adapter4);
 
		liste4.setOnItemSelectedListener(new OnItemSelectedListener() {
 
			@Override
			public void onItemSelected(AdapterView<?> parent, View v, int pos, long id) {
				String item4 = (String)parent.getItemAtPosition(pos);
 
				if (item4.equals("0 : Nulle")) stimul = 0;
				if (item4.equals("1 : Faible (léger mvt, grimace)")) stimul = 1;
				if (item4.equals("2 : Vive (cri, toux)")) stimul = 2;
			}
 
			@Override
			public void onNothingSelected(AdapterView<?> arg0) {
 
			}
 
		});
 
 
		liste5 = (Spinner)findViewById(R.id.spinner5);
		List<String> exemple5 = new ArrayList<String>();
		exemple5.add("0 : Cyanose ou pâleur générale");
		exemple5.add("1 : Tronc rose, extrémités cyanosées");
		exemple5.add("2 : Tronc et extrémités roses");
 
		ArrayAdapter<String> adapter5 = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, exemple5);
		adapter5.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
			liste5.setAdapter(adapter5);
 
		liste5.setOnItemSelectedListener(new OnItemSelectedListener() {
 
			@Override
			public void onItemSelected(AdapterView<?> parent, View v, int pos, long id) {
				String item5 = (String)parent.getItemAtPosition(pos);
 
				if (item5.equals("0 : Cyanose ou pâleur générale")) color = 0;
				if (item5.equals("1 : Tronc rose, extrémités cyanosées")) color = 1;
				if (item5.equals("2 : Tronc et extrémités roses")) color = 2;
 
			}
 
			@Override
			public void onNothingSelected(AdapterView<?> arg0) {
 
			}
 
		});
 
 
		calcul.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				score = fc + mvts_respi + tonus + stimul + color;
				resultat.setText(" " + score + "/10");
			}
		});
 
 
		raz.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				score = 0;
				resultat.setText("");	
			}
		});
 
	}
 
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
 
}
Et voici le code du layout:

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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >
 
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Battements cardiaques :"
        android:textColor="#AC1E44"
        android:textStyle="bold"
        android:gravity="center" />
 
    <Spinner 
        android:id="@+id/spinner1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:choiceMode="singleChoice" />
 
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Mouvements respiratoires :"
        android:textColor="#AC1E44"
        android:textStyle="bold"
        android:gravity="center" />
 
    <Spinner
        android:id="@+id/spinner2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:choiceMode="singleChoice" />
 
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Tonus musculaire :"
        android:textColor="#AC1E44"
        android:textStyle="bold"
        android:gravity="center" />
 
    <Spinner
        android:id="@+id/spinner3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:choiceMode="singleChoice" />
 
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Réactivité à la stimulation :"
        android:textColor="#AC1E44"
        android:textStyle="bold"
        android:gravity="center" />
 
    <Spinner
        android:id="@+id/spinner4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:choiceMode="singleChoice" />
 
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Coloration :"
        android:textColor="#AC1E44"
        android:textStyle="bold"
        android:gravity="center" />
 
    <Spinner
        android:id="@+id/spinner5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:choiceMode="singleChoice" />
 
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <Button
            android:id="@+id/score"
            android:layout_width="wrap_content"
        	android:layout_height="wrap_content"
        	android:layout_weight="1"
        	android:layout_marginLeft="25dp"
        	android:layout_marginRight="15dp"
        	android:text="Calcul score" />
 
        <Button
            android:id="@+id/raz"
            android:layout_width="wrap_content"
        	android:layout_height="wrap_content"
        	android:layout_weight="1"
        	android:layout_marginLeft="15dp"
        	android:layout_marginRight="25dp"
        	android:text="RAZ" />
	</LinearLayout>
 
	<LinearLayout
	    android:layout_width="fill_parent"
	    android:layout_height="wrap_content"
	    android:orientation="horizontal" >
 
	    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Score total :"
            android:textColor="#AC1E44"
            android:textSize="25dp"
            android:textStyle="bold" />
 
	    <TextView 
	        android:id="@+id/result"
	        android:layout_width="wrap_content"
    	    android:layout_height="wrap_content"
    	    android:text=""
    	    android:textSize="25dp" />
	</LinearLayout>"
 
</LinearLayout>
Merci de ce que pourrez faire pour m'aider.
Merci par avance,
cordialement