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 de clavier qui cache une zone de texte

Featured Replies

Posté(e)

Bonjour, j'ai un petit soucis qui doit être tout bête mais je ne trouve pas la solution.

J'ai, dans un écran, une zone de texte qui se retrouve derrière le clavier virtuel lorsque je clic dessus. Il y a t'il un paramètre pour que le clavier lorsqu'il s'ouvre décale toute la vue ?

voici mon fichier xml :

<?xml version="1.0" encoding="UTF-8"?>

   android:orientation="vertical"
   android:layout_width="fill_parent" 
   android:layout_height="fill_parent">

       android:layout_width="wrap_content" 
       android:background="@drawable/background_panel_haut" 
       android:layout_height="wrap_content">

               android:id="@+id/btnCancel"
               android:layout_height="wrap_content" 
               android:layout_width="75dip" 
               android:layout_centerVertical="true" 
               android:background="@drawable/custom_button" 
               android:textColor="@color/white"
                android:layout_marginLeft="5dip"/>

               android:id="@+id/btnSend" 
               android:layout_height="wrap_content" 
               android:layout_alignParentRight="true" 
               android:layout_width="75dip" 
               android:layout_centerVertical="true" 
               android:background="@drawable/custom_button" 
               android:textColor="@color/white" 
               android:layout_marginRight="5dip"/>    



       android:layout_width="wrap_content" 
       android:layout_marginTop="10dip" 
       android:layout_marginLeft="10dip" 
       android:layout_marginRight="5dip" 
       android:layout_height="wrap_content">

           android:layout_width="fill_parent" 
           android:layout_height="wrap_content"> 

                   android:layout_height="wrap_content" 
                   android:text="@string/Subject" 
                   android:maxLines="1" 
                   android:layout_alignParentLeft="true" 
                   android:layout_width="0dip" 
                   android:layout_weight="1" 
                   android:layout_gravity="center_vertical"/> 

                   android:id="@+id/champsSubject" 
                   android:layout_height="wrap_content" 
                   android:layout_width="0dip" 
                   android:layout_weight="4" 
                   android:maxLines="1" 
                   android:singleLine="true"/>



           android:layout_width="fill_parent" 
           android:layout_height="wrap_content" 
           android:layout_marginTop="50dip">  

                   android:layout_height="wrap_content" 
                   android:text="@string/From" 
                   android:layout_width="0dip" 
                   android:layout_weight="1" 
                   android:layout_gravity="center_vertical"/>

                       android:id="@+id/champsFrom"
                       android:layout_alignParentRight="true" 
                       android:layout_width="0dip" 
                       android:layout_height="wrap_content" 
                       android:layout_weight="4" 
                       android:prompt="@string/From" 
                       style="@color/white"/>    



           android:layout_width="fill_parent" 
           android:layout_height="wrap_content" 
           android:layout_marginTop="100dip">    

               android:layout_height="wrap_content" 
               android:text="@string/To" 
               android:layout_alignParentLeft="true" 
               android:layout_width="0dip" 
               android:layout_weight="1" 
               android:layout_gravity="center_vertical"/>

               android:id="@+id/btnWhoDisplay"
               android:layout_height="wrap_content"
               android:layout_width="0dip" 
               android:layout_weight="1" 
               android:background="@drawable/custom_button" 
               android:src="@drawable/who_picture_one" 
               android:layout_marginRight="2dip" 
               android:layout_marginTop="2dip"/>    

               android:id="@+id/champsTo" 
               android:layout_alignParentRight="true" 
               android:layout_width="0dip" 
               android:layout_height="wrap_content" 
               android:maxLines="1" 
               android:layout_weight="7" 
               android:singleLine="true" 
               android:scrollHorizontally="true"/>



           android:layout_width="fill_parent" 
           android:layout_marginTop="150dip" 
           android:layout_alignParentTop="true" 
           android:layout_height="wrap_content">    


                       android:id="@+id/champsBody" 
                       android:layout_width="fill_parent" 
                       android:layout_height="fill_parent" 
                       android:isScrollContainer="true" 
                       android:minLines="7" 
                       android:keepScreenOn="true"/>







       android:layout_width="fill_parent" 
       android:layout_gravity="bottom|left" 
       android:layout_height="wrap_content">

           android:id="@+id/tvAttachFile"
           android:minHeight="40dip"
           android:layout_width="fill_parent" 
           android:layout_height="wrap_content" 
           android:textColor="@color/white" 
           android:layout_alignParentBottom="true" 
           android:background="@drawable/background_panel_bas" 
           android:gravity="center_vertical|center_horizontal" 
           android:clickable="true"/>    



la zone concernée est l'EditText . De plus je ne comprend pas pourquoi mais elle me centre le texte par défault :/

Modifié par Nanis

Posté(e)

Pour ma part, je suis le sujet en attendant une réponse, c'est un problème que j'éprouve aussi...

Posté(e)

Je répond vite fait, je ne suis plus trop sûr, mais je crois que android:isScrollContainer="true" résoud le problème.

à tester... ;)

  • 2 weeks later...
Posté(e)

Tu as essayé de tout mettre dans une scrollview ? Tu rajoutes une scrollview qui englobe ton premier LinearLayout.

Posté(e)
  • Auteur

Bonjour,

il paraitrai que cela viendrai du fait que j'ai des relativeLayout dans mon xml.

Je n'ai pas réussi à tous faire ce que je voulais en LinearLayout c'set pour cela que j'avais mis relativeLayout. Est ce que tu es d'accord avec ça aussi ?

  • 1 month later...
Posté(e)

Salut,

tu dois ajouter une option au niveau de ton activity dans le manifest.

Essaye ces deux options :

-android:windowSoftInputMode="stateVisible|adjustResize"

ou bien ça:

-android:windowSoftInputMode="adjustPan"

  • 10 months later...
Posté(e)

Marche bien en mode portrait, mais pas en mode paysage :(

Je souhaiterai faire exactement la même chose, mais en mode paysage.

Avec cette option :

setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI

j'ai désactivé l'affichage spécial de l’édition de texte en mode paysage pour le mettre comme en mode portrait (c'est à dire que le clavier se rajoute à l'écran au lieu de lancer une interface juste pour éditer le texte).

Le problème, c'est que le texte ne se redimensionne pas en mode paysage (en mode portrait, aucun problème).

Quelqu'un a une idée?

Merci d'avance.

  • 1 year later...
Posté(e)

@Kerwan

à tu trouvé la solution?

j'aimerais aussi pouvoir avoir le même systeme de saisie qu'en mode portrait :mellow:

je trouve pas pratique du tout, le faite de perdre la conversation en mode paysage au detriment d'une grande zone de texte :( .

j'étais sur android avec clavier azerty physique(milestone 1 puis 2) ainsi que sur iphone et dans les 2 cas je gardais un oeil à ma conversation en mode paysage.

ce que je n'ai plus depuis mon galaxy s2 :huh:

Rejoignez la conversation

Vous pouvez poster maintenant et vous enregistrez plus tard. Si vous avez un compte, connectez-vous maintenant pour poster.

Invité
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Répondre à ce sujet…

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.