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.

Virer le clavier!

Featured Replies

Posté(e)

Salut

Mon soucis actuel qui commence à m'exaspérer est le clavier!

Déjà de 1), il se met par défaut sur un champ EditText et ca m'énerve.. J'ai joué avec tous les focus possibles, mais ca ne change rien: soit je perds le focus total sur ce champs, soit ca ne change rien

2) si l utilisateur est en train d'éditer un champs texte, a fini et clique sur un bouton, mon popup apareit et le clavier le gêne. L'utilisateur doit appuyer sur le bouton qui retire le clavier et c'est assez lourd pour lui.

J'aimerais donc que quand je clique sur un bouton je fasse une commande du genre keyboard.hide()

Mais impossible de trouver cette fonction dans la doc!

Je suis donc à votre écoute pour savoir si cette commande existe bel et bien

Merci et à la revoyure!

Edit: j'ai trouvé ce genre de choses, mais je dois spécier de quel EditText on affiche la clavier, mais il peut venir de n'importe lequel...

http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard'>

http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard

Modifié par Profete162

Posté(e)
  • Auteur

En fait toutes les méthodes que je trouve sur le net se referent toujours à un champs d'edittext.. J'aimerais pour ma part une solution beaucoup plus générale!

Posté(e)

^

android:windowSoftInputMode

How the main window of the activity interacts with the window containing the on-screen soft keyboard. The setting for this attribute affects two things:

* The state of the soft keyboard — whether it is hidden or visible — when the activity becomes the focus of user attention.

* The adjustment made to the activity's main window — whether it is resized smaller to make room for the soft keyboard or whether its contents pan to make the current focus visible when part of the window is covered by the soft keyboard.

sur lactivity tu peux dire pas de clavier quand elle prend le focus ^^

http://developer.android.com/guide/topics/manifest/activity-element.html

Posté(e)
  • Auteur

Ok, cela va déjà me faire avancer un peu, mais je pousse le vice un peu plus loin...

Car comme j ai dit, l'utilisateur peut cliquer sur un bouton ( qui ne lance pas d'activity) alors que le clavier est toujours là!

Il faudrait donc le retirer au moment du clic sur le bouton, non?

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.