android-snowfall icon indicating copy to clipboard operation
android-snowfall copied to clipboard

should start stopped

Open oduconge opened this issue 6 years ago • 2 comments

if I stop it on the onCreate, the animation always continuous...

oduconge avatar Nov 23 '18 22:11 oduconge

For stopping/starting, just use visibility attribute.

kuba14 avatar Nov 28 '18 20:11 kuba14

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); }

gcantoni avatar Dec 21 '19 21:12 gcantoni