Attempts to reduce memory usage of title screen and to improve
consistency over varied screen sizes and DPI (from spica to Full HD PC through high-end 5" phone). Far from complete...
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 937 B |
|
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 852 B |
|
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 872 B |
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 814 B |
|
Before Width: | Height: | Size: 625 B After Width: | Height: | Size: 596 B |
|
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 609 B |
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 491 B |
@@ -15,8 +15,8 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="-200sp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginBottom="-30sp"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/ts_background"/>
|
||||
|
||||
<com.gpl.rpg.AndorsTrail.view.CloudsAnimatorView
|
||||
@@ -28,8 +28,8 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="-200sp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginBottom="-30sp"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/ts_midground"/>
|
||||
|
||||
<com.gpl.rpg.AndorsTrail.view.CloudsAnimatorView
|
||||
@@ -41,8 +41,8 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="-200sp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginBottom="-30sp"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/ts_foreground"/>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="-50sp"
|
||||
android:layout_marginRight="-100sp"
|
||||
android:scaleType="centerCrop"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/ts_background"/>
|
||||
|
||||
<com.gpl.rpg.AndorsTrail.view.CloudsAnimatorView
|
||||
@@ -28,8 +29,9 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="-50sp"
|
||||
android:layout_marginRight="-100sp"
|
||||
android:scaleType="centerCrop"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/ts_midground"/>
|
||||
|
||||
<com.gpl.rpg.AndorsTrail.view.CloudsAnimatorView
|
||||
@@ -41,8 +43,9 @@
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="-50sp"
|
||||
android:layout_marginRight="-100sp"
|
||||
android:scaleType="centerCrop"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/ts_foreground"/>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical"
|
||||
android:elevation="0dp" >
|
||||
<!--
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_bg_top"
|
||||
android:layout_width="match_parent"
|
||||
@@ -13,7 +13,7 @@
|
||||
android:layout_weight="0.4"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ts_sky_top" />
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
android:id="@+id/title_bg_centerpattern"
|
||||
android:layout_width="match_parent"
|
||||
@@ -21,6 +21,7 @@
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/sky_gradient_drawable" />
|
||||
-->
|
||||
<!--
|
||||
<ImageView
|
||||
android:id="@+id/title_bg_bottom"
|
||||
android:layout_width="match_parent"
|
||||
@@ -28,7 +29,7 @@
|
||||
android:layout_weight="0.6"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ts_sky_bottom" />
|
||||
|
||||
-->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -90,11 +90,11 @@ public final class StartScreenActivity extends FragmentActivity implements OnNew
|
||||
});
|
||||
}
|
||||
|
||||
// if (development_version.getVisibility() == View.VISIBLE) {
|
||||
// development_version.setText(development_version.getText() +
|
||||
// "\nMax Heap: " + Runtime.getRuntime().maxMemory() / 1024 +
|
||||
// "\nTile size: " + (int) (32 * res.getDisplayMetrics().density));
|
||||
// }
|
||||
if (development_version.getVisibility() == View.VISIBLE) {
|
||||
development_version.setText(development_version.getText() +
|
||||
"\nMax Heap: " + Runtime.getRuntime().maxMemory() / (1024 * 1024) + "MB"+
|
||||
"\nTile size: " + (int) (32 * res.getDisplayMetrics().density));
|
||||
}
|
||||
|
||||
toggleUiVisibility();
|
||||
|
||||
|
||||
@@ -112,8 +112,6 @@ public class CloudsAnimatorView extends FrameLayout {
|
||||
final float x = (float) (((1-ratio) * (iv.getDrawable().getMinimumWidth() + layer.getWidth())) - iv.getDrawable().getMinimumWidth());
|
||||
final long d = (long)((ratio * duration) / (speedFactor + (Math.random() * SPEED_VARIANCE)));
|
||||
|
||||
L.log("Cloud added at "+x+","+y);
|
||||
|
||||
prepareAnimation(iv, layer, speedFactor, x, y, d);
|
||||
}
|
||||
|
||||
@@ -173,7 +171,6 @@ public class CloudsAnimatorView extends FrameLayout {
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||
super.onWindowFocusChanged(hasWindowFocus);
|
||||
L.log("Clouds onWindowFocusChanged("+hasWindowFocus+")");
|
||||
if (hasWindowFocus) {
|
||||
if (!started) {
|
||||
duration = (int) (DEFAULT_DURATION * getWidth() / (1024 * getResources().getDisplayMetrics().density));
|
||||
|
||||