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.

Changer la title bar

Featured Replies

Posté(e)

J'ai un peu de mal à changer la title bar.

J'ai bien changé styles.xml, themes.xml et mon activity dans le manifest.

J'ai aussi crée mon layout pour la bar

Enfin, j'ai ajouté ça dans mon activity :

this.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title_bar);

Malheureusement, ça n'a pour effet que de me mettre un fond noir

(j'ai mis le fond de la barre transparent, mais mon layout a un background rouge)

Donc j'ai un peu de mal à voir comment faire :/

La seule technique que j'ai trouvé est vraiment crade :

this.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
int titleContainerId = (Integer) Class.forName("com.android.internal.R$id").getField("title_container").get(null);
((ViewGroup) this.getWindow().findViewById(titleContainerId)).removeAllViews();
this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title_bar);

C'est vraiment moche, et je n'ai pas envie de laisser ça dans mon app :/

Vous avez une idée ?

Mici !!!

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.