[app] Fix a newyear header crash (#101)
This commit is contained in:
parent
75bd97607d
commit
3e11c276c6
|
|
@ -53,7 +53,7 @@ public class HolidayHelper {
|
||||||
view.setEmissionRate(rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270 ? 8 : 4);
|
view.setEmissionRate(rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270 ? 8 : 4);
|
||||||
view.setFadeOutPercent(0.75f);
|
view.setFadeOutPercent(0.75f);
|
||||||
view.setAngle(0);
|
view.setAngle(0);
|
||||||
RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) view.getLayoutParams();
|
CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) view.getLayoutParams();
|
||||||
lp.height = activity.getResources().getDisplayMetrics().heightPixels / (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270 ? 2 : 3);
|
lp.height = activity.getResources().getDisplayMetrics().heightPixels / (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270 ? 2 : 3);
|
||||||
view.setLayoutParams(lp);
|
view.setLayoutParams(lp);
|
||||||
setWeatherGenerator(new SnowGenerator(activity));
|
setWeatherGenerator(new SnowGenerator(activity));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue