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.

Problème affichage setContentView()

Featured Replies

Posté(e)

Bonjour bonjour,

 

je suis nouveau ici donc à l'avance désolé si je fais une bêtise ou l'autre :)

 

Sous Android Studio,

 

Comment pourrais-je procéder dans un fichier java pour afficher à la fois le contenu de  :  

 

setContentView(R.layout.activity_main);

et 

setContentView(textView) d'un textView que j'ai repris et édité.

 

J'ai comme l'impression que c'est soit l'un soit l'autre...

 

Voila je sais que c'est une question de noob mais bon faut bien commencer quelque part j'imagine ^^

Modifié par Bifista

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

setContentView permet à ton Activity d'inflater le layout qu'elle gèrera. Il ne faut faire appel à cette méthode qu'une seule fois dans ton Activity (sauf cas exceptionnels - et encore).

Que souhaites-tu faire exactement avec ton TextView ?

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.