Aller au contenu

problème de fixation des buttons dans une UI


salimdz

Recommended Posts

Posté(e)

Bonjour,

j'ai un problème de fixation des buttons dans une UI,

le button droit il n'est pas fixe, des fois il est affiché, des fois il est caché, des fois il est petit ...

je veux aussi fixe les dimensions d'imageviw et adapté les photos avec ce imageview

le botton droit il est affiché

principauxsites1.png

le botton droit il est caché

principauxsites2.png

voila le fichier xml :

<?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">

<Button
	android:id="@+id/Prior"
	android:layout_height="205dp"
	android:layout_width="28dp"
	android:textSize ="18sp"
	android:textStyle ="bold"
	android:text="@string/Prior"/>

<ImageView
	android:id="@+id/Image"
	android:layout_width="wrap_content"
	android:layout_height="200dp"
	android:layout_toRightOf="@id/Prior"/>

<Button 
	android:id="@+id/Next"
	android:layout_height="205dp"
	android:layout_width="28dp"
	android:textSize ="18sp"
	android:textStyle ="bold"		
	android:text="@string/Next"
	android:layout_toRightOf="@id/Image"/>

<WebView 
	android:id="@+id/webkit"
	android:layout_height="wrap_content"
	android:layout_width="wrap_content"
	android:layout_below="@id/Image"/>					

</RelativeLayout>

j'attende votre aide,

merci d'avance pour votre aide

bonne journée

a+

Posté(e)

le botton droit il est caché

principauxsites2.png

Bonjour,

j'ai règle le problème

infoalgerie5.png

j'ai ajouter :

android:layout_alignParentLeft="true"

android:layout_alignParentRight="true"

voila le fichier xml :

<?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">

<Button
	android:id="@+id/Prior"
	android:layout_alignParentLeft="true"
	android:layout_height="200dp"
	android:layout_width="32dp"
	android:textSize ="25sp"
	android:textStyle ="bold"
	android:text="@string/Prior"/>

<ImageView
	android:id="@+id/Image"
	android:layout_width="255dp"
	android:layout_height="200dp"
	android:scaleType="fitXY"
	android:layout_toRightOf="@id/Prior"/>

<Button 
	android:id="@+id/Next"
	android:layout_alignParentRight="true"
	android:layout_height="200dp"
	android:layout_width="32dp"
	android:textSize ="25sp"
	android:textStyle ="bold"		
	android:text="@string/Next"
	android:layout_toRightOf="@id/Image"/>

<WebView 
	android:id="@+id/webkit"
	android:layout_height="wrap_content"
	android:layout_width="wrap_content"
	android:layout_below="@id/Image"/>					

</RelativeLayout>

Posté(e)

le LinearLayout est beaucoup plus facile à utiliser que le RelativeLayout ceci dit...

bonjour,

je pense que le RelativeLayout il est mieux adapté pour les versions multi écran (mutli-screen)

a+

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

×
×
  • Créer...