Bonjour à tous amis développeurs,
Je débute sur le développement Android et j'ai déjà besoin de votre expérience
Mon problème est simple: j'ai intégré un widget NumberPicker sur mon appli qui ne s'affiche qu'à moitié (cf. image en PJ) que ce soit sur l'émulateur ou sur mon tèl.
Voici le code XML de ma vue (le widget NumberPicker est à la fin):
Code XML : 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 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" 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=".ProductsListActivity" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:text="@string/label_intro_listeCourses" /> <EditText android:id="@+id/editText2" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_alignTop="@+id/editText1" android:layout_toRightOf="@+id/editText1" android:ems="10" android:hint="@string/textFieldHint_marque" android:inputType="textCapWords" /> <EditText android:id="@+id/editText1" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView1" android:layout_below="@+id/textView1" android:layout_marginTop="23dp" android:ems="10" android:hint="@string/textFieldHint_produit" android:inputType="textCapWords" /> <Button android:id="@+id/button1" style="?android:attr/buttonStyleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/editText2" android:layout_alignParentBottom="true" android:layout_marginBottom="135dp" android:layout_marginLeft="51dp" android:text="@string/btn_valider_produit" android:onClick="onClickBtnValider"/> <NumberPicker android:id="@+id/numberPicker1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignTop="@+id/textView1" android:layout_marginRight="20dp" /> </RelativeLayout>
Je précise que j'ai modifié l'attribut minSdkVersion de mon manifest ainsi: android:minSdkVersion="11"
Pouvez-vous m'aider ?
Tiens tant que j'y suis je pose une autre question. J'utilise Eclipse ADT et l'outil Graphical Layout pour placer mes widgets. Est-ce normal que je n'arrive pas à les redimensionner directement avec cet outil ? Du coup je fais par approximation dans le code XML...
Merci pour votre aide.
Partager