Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[RÉSOLU] Problème réalisation UI

Featured Replies

Posté(e)

Bonjour à tous!

Je viens vers vous pour un petit coup de main concernant une interface graphique sur laquelle je me casse les dents depuis quelques jours.

(Voir pièce jointe )

En gros, toute mon interface s'articule autour d'un ViewFlipper.

Au dessus : un LinearLayout

En dessous: un LinearLayout

A gauche: une ImageView (utilisée pour afficher la vue précédente dans le ViewFlipper)

A droite: une ImageView (utilisée pour afficher la vue suivante dans le ViewFlipper)

J'imagine qu'il faut utiliser un RelativeLayout pour faire ça, mais j'avoue que je suis loin d'être un expert en la matière :emo_im_foot_in_mouth:

Y'aurait-il ici, une ame charitable pour m'aider à résoudre ce problème ?

Modifié par Bertrand31

Posté(e)

Howdy-ho,

si j'étais toi j'utiliserais un LinearLayout vertical (android:orientation="vertical") pour faire les 3 lignes qui comprennent:

1.LinearLayout

2.RelativeLayout (un linearlayout horizontal) qui contient ImageView/ViewFlipper/ImageView

3.LinearLayout

C'est ordonné et pas trop chargé.

Posté(e)

Howdy-ho,

si j'étais toi j'utiliserais un LinearLayout vertical (android:orientation="vertical") pour faire les 3 lignes qui comprennent:

1.LinearLayout

2.RelativeLayout (un linearlayout horizontal) qui contient ImageView/ViewFlipper/ImageView

3.LinearLayout

C'est ordonné et pas trop chargé.

Salut Sylvain,

Merci pour ta réponse (très rapide ^^)

Je suis assez d'accord avec toi sur cette organisation, mais le truc que j'ai du mal à voir, c'est comment je vais dire à mon RelativeLayout de prendre toute la place disponible entre les deux LinearLayout...

Tu vois ce que je veux dire ?

Posté(e)

Bon je viens de trouver...

En fait c'est tout con! Même pas besoin d'un RelativeLayout.

Il suffit d'utiliser les "android:layout_weight"

Voici le code :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:orientation="vertical">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:layout_height="wrap_content"
	android:layout_width="fill_parent"
	android:gravity="center"
	android:background="#FFF"
	android:text="TEXTE"
	android:padding="10dp"/>	
</LinearLayout>

<LinearLayout
       android:id="@+id/bottom_row"
       android:orientation="horizontal"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:gravity="center" 
       android:layout_weight="1">

       <ImageView
           android:id="@+id/view1"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:src="@drawable/arrow_left" />

       <ViewFlipper android:id="@+id/details" 
       android:layout_width="wrap_content"
       android:layout_height="fill_parent"
       android:layout_weight="1"/> 

        <ImageView
           android:id="@+id/view3"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:src="@drawable/arrow_right" />
   </LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:layout_height="wrap_content"
	android:layout_width="fill_parent"
	android:gravity="center"
	android:background="#FFF"
	android:text="TEXTE"
	android:padding="10dp"/>	
</LinearLayout>

</LinearLayout>

Merci quand même Sylvain

Posté(e)

"bottom_row" doit avoir android:layout_height à 0dip

"details" doit avoir android:layout_width à 0dip

c'est plus propre

(garde tes weight à 1)

Posté(e)

"bottom_row" doit avoir android:layout_height à 0dip

"details" doit avoir android:layout_width à 0dip

c'est plus propre

(garde tes weight à 1)

OK!

Merci ;)

Archivé

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

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.