* A simple {@link Fragment} subclass.
*/
public class SplashScreen extends CampusAppFragment {
+ private static final boolean PARALLELIZE_SPLASHTASKS = true;
+
private ProgressBar splashProgress;
private int progressCounter;
private Handler timerHandler = new Handler();
AppContext.setTitle("DHBW Lörrach");
- ImageView splashImage = (ImageView)view.findViewById(R.id.splashImage);
- BitmapFactory.Options dimensions = new BitmapFactory.Options();
- Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.dhbw_campus_hd, dimensions);
- int height = dimensions.outHeight;
- int width = dimensions.outWidth;
- Display display = AppContext.getMainActivity().getWindowManager().getDefaultDisplay();
- Point size = new Point();
- display.getSize(size);
- float scaleX = (float)size.x / (float)width;
- float scaleY = (float)size.y / (float)height;
- float scale = Math.max(scaleX, scaleY);
- int newWidth = (int)(width*scale);
- int newHeight = (int)(height*scale);
- Bitmap newBitmap = Bitmap.createScaledBitmap(mBitmap, newWidth, newHeight, true);
- splashImage.setImageBitmap(newBitmap);
-
timerRunnable = new Runnable() {
@Override
public void run() {
}
else
break;
+
return;
case 4:
String startCounter = AppContext.getDatabaseManager().getRuntimeCache("AppStartCounter");