Skip to content

Repository files navigation

xFallView

DownloadApiLicenseApk

snowfallflexible-toolbarheartfallcurrencyfall

Setup

repositories {
jcenter()
}
dependencies {
implementation 'com.github.docentTSR:xFallView:0.9.3'
}

Usage

layout.xml

<com.docentTSR.xFallView.views.XFallView
android:id="@+id/x_fall_view"android:layout_width="match_parent"android:layout_height="match_parent"app:viewsCount="80"app:minSpeed="60"app:maxSpeed="95"app:minAlpha="10"app:maxAlpha="255"app:minScale="30"app:maxScale="60"app:wind="slight"app:rotate="on"app:srcArray="@array/drawable_array"
/>

arrays.xml

<arrayname="drawable_array">
<item>@drawable/drawable_1</item>
<item>@drawable/drawable_2</item>
<item>@drawable/drawable_...</item>
<item>@drawable/drawable_n</item>
</array>

Attributes description

AttrubuteValueDefaultDescription
app:viewsCountn > 050views count for x-fallview
app:minSpeedn > 050minimum speed for each view
app:maxSpeedn ≥ minSpeedminSpeed * 3maximum speed for each view
app:minAlphan > 010minimum transparency value for each view
app:maxAlphaminAlpha ≤ n ≤ 255255maximum transparency value for each view
app:minScalen > 050minimum scale value for each view
app:maxScalen (100 = 1:1)100maximum scale value for each view
app:windslight, normal, strongdisabledwind option for all views
app:rotateon, offoffrotate option for all views

Optimization tips

  • use optimized drawable resources. For example, use ImageOptim;
  • use drawables for each screen density mdpi, hdpi, xhdpi, xxhdpi.

Tasks list

  • 👀 random alpha for xViews;
  • 🚀 random speed for xViews;
  • 🔍 random scale for xViews;
  • 💨 wind for xViews;
  • 🌀 rotate for xViews;
  • 📐 random start rotate angle for xViews;
  • ✨ replace single drawable to drawable list for xViews;
  • 🚴 random rotate speed for xViews;
  • 🔄 random rotate direction for xViews.

License

Copyright 2018 Anton Savenok
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

🔥 Android library for drawing views like snowfall

Topics

Resources

Stars

17 stars

Watchers

3 watching

Forks

Contributors

Languages