Android Open Source - semana-isw2013 Splash Activity






From Project

Back to project page semana-isw2013.

License

The source code is released under:

Apache License

If you think the Android project semana-isw2013 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package mobi.itson.semanaisw2013app;
/*w  w  w  .ja  v a 2  s .  c  o  m*/
import mobi.itson.semanaisw2013app.utils.ActivityUtils;
import mobi.itson.semanaisw2013app.utils.BitmapHack;
import android.content.Intent;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.widget.ImageView;

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.app.ActionBar;

public class SplashActivity extends SherlockActivity{

  @Override
  protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_launcher);
    
    
    //Get the image view reference
    ImageView imageView = (ImageView) findViewById(R.id.splash_imageview);
    
    /**Size with [0]= width
    [1] = height**/
    int[] size = ActivityUtils.getScreenSize(this);
    
    //Hack the bitmap
    Bitmap bitmap = BitmapHack.decodeSampledBitmapFromResource(getResources(), 
        R.drawable.semana_isw_logoo, size[0], size[1]);
    
    //Set the source for the imageview
    imageView.setImageBitmap(bitmap);
    
    //Hide the action bar
    ActionBar actionBar = getSupportActionBar();
    actionBar.hide();
    
    //Handler
    Handler handler = new Handler();
    
    //run an thread after x seconds to start the home screen
    int x = 2;
    handler.postDelayed(new Runnable() {
      
      @Override
      public void run() {
        
        //Finishing the Splash Screen and preventing to come back to menu
        finish();
        
        //Starting the Main Screen
        Intent intent = new Intent(getApplicationContext(), MainActivity.class);
        SplashActivity.this.startActivity(intent);
      }
    }, x * 1000); // time in milliseconds (1 second = 1000 milliseconds) until the run() method will be called
  }
  
}




Java Source Code List

mobi.itson.semanaisw2013app.AboutUsActivity.java
mobi.itson.semanaisw2013app.ConferenceActivity.java
mobi.itson.semanaisw2013app.Conference.java
mobi.itson.semanaisw2013app.ConferencesPagerFragment.java
mobi.itson.semanaisw2013app.GalleryActivity.java
mobi.itson.semanaisw2013app.ImagePagerActivity.java
mobi.itson.semanaisw2013app.MainActivity.java
mobi.itson.semanaisw2013app.ScheduleActivity.java
mobi.itson.semanaisw2013app.SplashActivity.java
mobi.itson.semanaisw2013app.WebView_Register_Actvity.java
mobi.itson.semanaisw2013app.WorkshopActivity.java
mobi.itson.semanaisw2013app.WorkshopPagerFragment.java
mobi.itson.semanaisw2013app.Workshop.java
mobi.itson.semanaisw2013app.utils.ActivityUtils.java
mobi.itson.semanaisw2013app.utils.BitmapHack.java
mobi.itson.semanaisw2013app.utils.Constants.java
mobi.itson.semanaisw2013app.utils.HttpHelper.java
mobi.itson.semanaisw2013app.utils.SemanaUpload.java
mobi.itson.semanaisw2013app.utils.TouchHighlightImageButton.java
mobi.itson.semanaisw2013app.utils.UploadImage.java