Created
August 16, 2013 17:17
-
-
Save YvesBill/6251738 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| public class Splash extends Activity { | |
| private static final int STOPSPLASH = 0; | |
| // Tempo impiegato dalla ImageView calcolato in millisecondi | |
| private static final long SPLASHTIME = 3000; | |
| private ImageView splash; | |
| @Override | |
| public void onCreate(Bundle icicle) { | |
| super.onCreate(icicle); | |
| setContentView(R.layout.splash); | |
| splash = (ImageView) findViewById(R.id.splash); | |
| Message msg = new Message(); | |
| msg.what = STOPSPLASH; | |
| splashHandler.sendMessageDelayed(msg, SPLASHTIME); } | |
| private Handler splashHandler = new Handler() { | |
| @Override | |
| public void handleMessage(Message msg) { | |
| //L'unico case disponibile toglie la View alla immagine dopo un tot tempo | |
| switch (msg.what) { | |
| case STOPSPLASH: | |
| splash.setVisibility(View.GONE); | |
| break; | |
| } | |
| super.handleMessage(msg); | |
| } | |
| .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment