Open oduconge opened 6 years ago
For stopping/starting, just use visibility attribute.
Just use this:
com.jetradarmobile.snowfall.SnowfallView snow; snow = findViewById(R.id.snow); snow.setVisibility(View.VISIBLE);
And in your desired layout xml file:
<com.jetradarmobile.snowfall.SnowfallView android:id="@+id/snow" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="invisible" />
If you want to start/stop it you can use for example SharedPreferences.
if (prefs.getBoolean("snowPref", true)) { com.jetradarmobile.snowfall.SnowfallView snow; snow = findViewById(R.id.snow); snow.setVisibility(View.VISIBLE); }
if I stop it on the onCreate, the animation always continuous...