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.

Obtenir les éléments d'un RemoteViews

Featured Replies

Posté(e)

Salut les jeunes!

Je fais un bôôôô widget que je construit logiquement avec une RemoteViews depuis un XML layout.

Dans mon XML, j'ai plusieurs boutons pour le widget... mais je ne vois pas comment retrouver ces boutons pour y lier l'écouter du clic.

Quelqu'un a une idée de comment faire ça ?

Merci d'avance!

Posté(e)

C'est la même façon de faire (rien ne change en fait) :) :

  • Tu retrouves ton id via R.id.myButtonId
  • Ensuite tu associs des PendingIntent à tes boutons
myRemoteView.setOnClickPendingIntent(R.id.myButtonId, new PendingIntent(...), flag);

Modifié par Fluckysan

Posté(e)
  • Auteur

PendingIntent ??? Oula faut que je creuse pour ca...

Merci

Posté(e)

C'est pas plus dur qu'un Intent normal t'inquiète

Modifié par Fluckysan

Posté(e)
  • Auteur

Ok ca marche merci!

C'est quand même moins malléable qu'un bon écouteur onClick

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.