Bonjour,

Dans le cadre d'un développement, je suis amené a faire des marges tout autour de mon linearLayout racine de mon Xml. Les margins marchent partout sauf pour android 2.2 et 2.3 ...

pour un code comme ceci :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
<LinearLayout 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:background="@android:color/black"
    tools:context=".MainActivity"
    android:layout_margin="20dp" >
 
</LinearLayout>
j'obtiens une image comme celle-ci (avec ANDROID 2.2) :






Or, ce que je veux obtenir, c'est un résultat comme sous android 4.2.2 :





quelqu'un aurait-il une solution pour m'aider ?