J'ai lu un billet sur le site frandoid qui parlait des DIP afin qu'il n'y ait pas de problème au nivevau de l'affichage. Je faisais tous mes tests sur un HTC Desire. J'ai décidé d'essayer les dip avec l'émulateur par défault!


Donc j'essaye, et là je m'apercois que des éléments ne s'affichent pas comme le dernier TextView; voici mon fichier .xml


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
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
 
>
 
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SimplyBus"
android:layout_centerHorizontal="true"
android:textSize="40dip"
android:layout_marginBottom="60dip"/>
 
<ImageButton
android:id="@+id/button1"
android:background="@drawable/cardock"
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_below="@id/text1" 
android:layout_marginLeft="50dip"
android:layout_marginBottom="40dip" />
 
<ImageButton
android:id="@+id/button2"
android:background="@drawable/sms"
android:layout_toRightOf="@id/button1"
android:layout_below="@id/text1" 
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_marginLeft="20dip"
/>
 
<ImageButton
android:id="@+id/button3"
android:background="@drawable/maps"
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_below="@id/button1" 
android:layout_marginLeft="50dip"
android:layout_marginBottom="40dip" />
/>
 
<ImageButton
android:id="@+id/button4"
android:layout_toRightOf="@id/button3"
android:layout_below="@id/button1" 
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_marginLeft="20dip"
 
 
/>
 
<TextView
android:id="@+id/text2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_marginTop="75dip"
android:text="Version 1.0"
android:textSize="10dip"
android:layout_below="@id/button3"
/>
</RelativeLayout>
D'où vient mon problème?

Cordialement