Fondamentalement, il existe un RelativeLayout et deux vues enfant (TextViews). L'un d'un enfant a une largeur plus grande que l'autre (cela dépend du contenu de la largeur de l'enfant cos définie sur "wrap_content"). Comment déplacer le plus petit téléviseur, que sa bordure droite correspond à la bordure droite de son conteneur (RL)? Situation Aligner les vues enfant à l'intérieur de RelativeLayout pour correspondre à la bordure droite du parent
désiré alocation
XML:
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="right"
>
<TextView
android:id="@+id/effect_text"
android:textSize="100sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textStyle="bold"
android:textColor="@color/transparent_color"
android:text="88:88"
/>
<TextView
android:id="@+id/text"
android:textSize="100sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:shadowColor="@color/text_shadow"
android:shadowDx="1"
android:shadowDy="1"
android:shadowRadius="10"
android:text="12:34"/>
</RelativeLayout>
montrer votre fichier layout.xml à la question –