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.

Effet de "fondu" entre differents écrans?...

Featured Replies

Posté(e)

Bonjour a tous,

voila je suis débutant dans la programmation d'applications Android, et la je ne sait pas comment faire une chose bien particulière.

En faite j'ai créé un SplashScreen avec une image et un son, qui est redirigé après x secondes vers une autres page, et j'aimerais ajouter un effet graphique(je n'ai pas le nom exacte en faite), de "fondu"(l'image devient progressivement noir puis l'autre page apparait elle aussi progressivement).

Voila donc si vous voyer de quoi je veut parler et si vous avez la solution, cela m'aiderai beaucoup.

Ci-joint le code source de mon SplashScreen(ci ca peut aider).

Merci d'avance.

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Window;
import android.view.WindowManager;
import android.media.MediaPlayer;
import android.content.Context;

public class Splash extends Activity {
   private static final int STOPSPLASH = 0;
   private static final long SPLASHTIME = 3000;

   MediaPlayer mp1;
   final Context mContext = this;

   private Handler splashHandler = new Handler() {
       @Override
       public void handleMessage(Message msg) {
           switch (msg.what) {
               case STOPSPLASH:
                       Intent intent = new Intent(Splash.this, Language.class);
                   startActivity(intent);
                   Splash.this.finish();
                   break;
           }
           super.handleMessage(msg);
       }
   };

   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);

       requestWindowFeature(Window.FEATURE_NO_TITLE);  
       getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,   
                               WindowManager.LayoutParams.FLAG_FULLSCREEN);  

       setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

       setContentView(R.layout.splash);
       Message msg = new Message();
       msg.what = STOPSPLASH;
       splashHandler.sendMessageDelayed(msg, SPLASHTIME);

       mp1 = MediaPlayer.create(mContext, R.raw.fallingrockstudio);
       mp1.start();
   }
}

Modifié par miammiam

  • 3 weeks later...

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.