SplashScreen Bild Skalierung entfernt: Unnötiger Speicherfresser
[DHBWCampusApp.git] / app / src / main / java / de / dhbwloe / campusapp / fragments / SplashScreen.java
index 445a6082260f6b92f7efb724ab65c31d5e1b65cb..6ecc333283d5b63178811c996a3a2a3b2f762063 100644 (file)
@@ -50,6 +50,8 @@ import de.dhbwloe.campusapp.vorlesungen.CourseGroup;
  * 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();
@@ -83,22 +85,6 @@ public class SplashScreen extends CampusAppFragment {
 
         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() {
@@ -139,6 +125,7 @@ public class SplashScreen extends CampusAppFragment {
                         }
                         else
                             break;
+
                         return;
                     case 4:
                         String startCounter = AppContext.getDatabaseManager().getRuntimeCache("AppStartCounter");