Skip to content

Commit

Permalink
Merge pull request #7 from r21nomi/issue/bintray
Browse files Browse the repository at this point in the history
Use bintray to upload library to JCenter
  • Loading branch information
r21nomi committed Jun 13, 2017
2 parents ce28922 + d372508 commit f0ec77b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
51 changes: 51 additions & 0 deletions README.md
@@ -1,8 +1,59 @@
# GLRippleView
[ ![Download](https://api.bintray.com/packages/r21nomi/maven/glrippleview/images/download.svg) ](https://bintray.com/r21nomi/maven/glrippleview/_latestVersion)

Custom GLSurfaceView for Android to show ripple effect with OpenGL.

Simple | Cross-fade
---- | ----
![](art/ripple.gif) | ![](art/fade.gif)

Ripple algorithm of this library is based on [Adrian Boeing's article](http://adrianboeing.blogspot.jp/2011/02/ripple-effect-in-webgl.html).

## Getting Started
```groovy
dependencies {
compile 'com.github.r21nomi:glrippleview:1.0.0'
}
```

## Usage
### Simple
```xml
<r21nomi.com.glrippleview.GLRippleView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:backgroundImage="@drawable/bg1" />
```
```kotlin
glRippleView.setRippleOffset(0.01f)
```

### Cross-fade
```kotlin
glRippleView.run {
addBackgroundImages(listOf(
BitmapFactory.decodeResource(resources, R.drawable.bg2),
BitmapFactory.decodeResource(resources, R.drawable.bg3)
))
setRippleOffset(0.01f)
setFadeInterval(5000)
startCrossFadeAnimation()
}
```

## License
```
Copyright 2017 Ryota Takemoto (r21nomi)
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.
```
4 changes: 3 additions & 1 deletion build.gradle
Expand Up @@ -7,8 +7,10 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.novoda:bintray-release:0.3.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -22,4 +24,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
11 changes: 11 additions & 0 deletions library/build.gradle
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'kotlin-android'

android {
Expand Down Expand Up @@ -29,6 +30,16 @@ dependencies {
testCompile 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}

repositories {
mavenCentral()
}

publish {
userOrg = 'r21nomi'
groupId = 'com.github.r21nomi'
artifactId = 'glrippleview'
publishVersion = '1.0.0'
desc = 'Custom GLSurfaceView for Android to show ripple effect with OpenGL.'
website = 'https://github.com/r21nomi/GLRippleView'
}

0 comments on commit f0ec77b

Please sign in to comment.