Skip to content

Commit

Permalink
Prepare version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkil committed Dec 25, 2016
1 parent 2b70d7c commit 5d2da6f
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 13 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ Change Log
==========


## Version 1.1.0

_2016-12-25_

* Support custom snowflake image (attr `snowflakeImage`).
* Support custom snowflake angle (attr `snowflakeAngleMax`).
* Support custom snowflake speed (attrs `snowflakeSpeedMin`, `snowflakeSpeedMax`).
* All snowflakes are unique (size, speed, angle, alpha, start position).
* Calculate size by using gaussian ("normally") distribution.


## Version 1.0.0

_2016-12-23_
Expand Down
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Android-Snowfall

[![Release](https://jitpack.io/v/jetradarmobile/android-snowfall.svg)](https://jitpack.io/#jetradarmobile/android-snowfall)

Implementation of Snowfall view.
Fully customizable implementation of "Snowfall View" on Android.

![image](https://raw.githubusercontent.com/JetradarMobile/android-snowfall/master/art/snowfall-demo.gif)


Compatibility
Expand All @@ -30,24 +32,38 @@ Add the dependency

```groovy
dependencies {
compile 'com.github.jetradarmobile:android-snowfall:1.0.0'
compile 'com.github.jetradarmobile:android-snowfall:1.1.0'
}
```


Usage
-----

Default implementation with round snowflakes:

```xml
<com.jetradarmobile.snowfall.SnowfallView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
```

Fully customized implementation:

```xml
<com.jetradarmobile.snowfall.SnowfallView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:snowflakesNum="150"
app:snowflakeAlphaMin="150"
app:snowflakesNum="250"
app:snowflakeAlphaMin="200"
app:snowflakeAlphaMax="250"
app:snowflakeSizeMin="2dp"
app:snowflakeSizeMax="8dp"
app:snowflakeFadingEnabled="false"/>
app:snowflakeAngleMax="5"
app:snowflakeSizeMin="8dp"
app:snowflakeSizeMax="32dp"
app:snowflakeSpeedMin="4"
app:snowflakeSpeedMax="12"
app:snowflakeFadingEnabled="true"
app:snowflakeImage="@drawable/snowflake"/>
```


Expand Down
Binary file added art/snowfall-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion snowfall-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'

dependencies {
compile project(':snowfall')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.0.5-3'
}

Expand Down
6 changes: 3 additions & 3 deletions snowfall-sample/src/main/res/layout/activity_snowfall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
app:snowflakeAlphaMin="200"
app:snowflakeAlphaMax="250"
app:snowflakeAngleMax="5"
app:snowflakeSizeMin="6dp"
app:snowflakeSizeMax="24dp"
app:snowflakeSizeMin="8dp"
app:snowflakeSizeMax="32dp"
app:snowflakeSpeedMin="4"
app:snowflakeSpeedMax="8"
app:snowflakeSpeedMax="12"
app:snowflakeFadingEnabled="true"
app:snowflakeImage="@drawable/snowflake"/>

Expand Down
4 changes: 3 additions & 1 deletion snowfall-sample/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<resources>

<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorAccent">#536DFE</color>

</resources>
2 changes: 1 addition & 1 deletion snowfall/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

dependencies {
compile 'com.android.support:support-compat:25.1.0'
compile 'com.android.support:support-compat:25.0.1'
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.0.5-3'
}

Expand Down

0 comments on commit 5d2da6f

Please sign in to comment.