diff --git a/Habitica/res/layout/activity_login.xml b/Habitica/res/layout/activity_login.xml index 7cd221b0f..6ce4a6f85 100644 --- a/Habitica/res/layout/activity_login.xml +++ b/Habitica/res/layout/activity_login.xml @@ -33,7 +33,7 @@ android:layout_height="0dp" android:layout_centerHorizontal="true" android:visibility="invisible" - android:layout_below="@id/city_view" /> + android:layout_above="@id/city_view" /> diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.java b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.java index 34f704a9e..f84fdcd9b 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.java +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.java @@ -39,6 +39,7 @@ public class LoginBackgroundView extends RelativeLayout { private int width; private int height; private boolean didLayoutStars = false; + private FrameLayout.LayoutParams params; public LoginBackgroundView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); @@ -50,6 +51,7 @@ public class LoginBackgroundView extends RelativeLayout { super.onFinishInflate(); ButterKnife.bind(this, this); starViews = new ArrayList<>(); + params = new FrameLayout.LayoutParams(0, 0); generateStars(); animateClouds(); } @@ -72,7 +74,9 @@ public class LoginBackgroundView extends RelativeLayout { this.width = parentWidth; this.height = (int)(parentHeight*SIZE_FACTOR); this.setMeasuredDimension(width, height); - this.setLayoutParams(new FrameLayout.LayoutParams(width, height)); + params.width = width; + params.height = height; + this.setLayoutParams(params); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } @@ -83,7 +87,7 @@ public class LoginBackgroundView extends RelativeLayout { } public void generateStars() { - generateStars(1, 10, 20); + generateStars(1, 12, 25); } private void generateStars(int largeCount, int mediumCount, int smallCount) {