Skip to content

Commit

Permalink
Added read me and modification for the app
Browse files Browse the repository at this point in the history
  • Loading branch information
poldz123 committed Aug 18, 2016
1 parent 78693bc commit 3c826cf
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 5 deletions.
93 changes: 92 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,92 @@
# ShapeRipple
Demo
======
For a brief overview of the library you can download the app in **Google PlayStore** [**Shape Ripple apk**](https://play.google.com/store/apps/details?id=com.rodolfonavalon.shaperipple) and try it out. The apk code for this demo app is located in the **ShapeRippleExample folder**

![alt tag](https://media.giphy.com/media/14jherDI1K2Yww/giphy.gif)

Features
=======

- Ripple effect
- Random ripple colors
- Random ripple position
- Loaded with 4 different shapes
- Create customizable shapes
- Modify duration and interval of ripples

All Available Attributes
=======
`ripple_color` - **color** *color of the base ripple*

`enable_single_ripple` - **boolean** *flag for enabling the single ripple only*

`ripple_duration` - **millisecond** *the duration of each ripple animation*

`enable_color_transition` - **boolean** *flag for enabling the color transition*

`enable_random_position` - **boolean** *flag for enabling the random positining of ripple in the view*

`enable_random_color` - **boolean** *flag for enabling the random coloring for each ripple*

`ripple_from_color` - **color** *starting color for the color transition of the ripple*

`ripple_to_color` - **color** *end color for the color transition of the ripple*

`ripple_stroke_width` - **dimension** *base stroke width for each of the ripple*


Usage
=======
You can select which options you want to use:

**1. JCenter dependency(Recommended)**

- Add it to your app `build.gradle`:

```gradle
dependencies {
compile 'com.rodolfonavalon:ShapeRippleLibrary:0.1.0'
}
```

**2. Gradle maven dependency**

- Add it to your app `build.gradle`:

```gradle
repositories {
maven {
url 'https://dl.bintray.com/nuuneoi/maven/'
}
}
...
dependencies {
compile 'com.rodolfonavalon:ShapeRippleLibrary:0.1.0'
}
```

**3. Clone whole repository**
- Open your **commandline-input** and navigate to the desired destination folder on your machine (where you want to place the library)
- Use the command `https://github.com/poldz123/ShapeRipple.git` to download the full ShapeRipple repository to your computer (this includes the folder of the library as well as the folder of the example project)
- Import the library folder (`ShapeRippleLibrary`) into Android Studio (recommended) or your Eclipse workspace
- Add it as a reference to your project:
- [referencing library projects in Eclipse](http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject)
- [managing projects from Android Studio](https://developer.android.com/sdk/installing/create-project.html)

License
=======
Copyright 2016 Rodolfo Navalon

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: 2 additions & 2 deletions ShapeRippleExample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.rodolfonavalon.shaperipple"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
versionCode 2
versionName "0.1.0"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
package com.rodolfonavalon.shaperipple;

import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.design.widget.NavigationView;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatCheckBox;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.TextView;

import com.rodolfonavalon.shaperipplelibrary.ShapeRipple;
import com.rodolfonavalon.shaperipplelibrary.model.Circle;
Expand Down Expand Up @@ -112,6 +117,26 @@ public boolean onNavigationItemSelected(MenuItem item) {
case R.id.nav_star:
ripple.setRippleShape(new Star());
break;
case R.id.nav_github:
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/poldz123/ShapeRipple"));
startActivity(browserIntent);
break;
case R.id.nav_about:

View layout = LayoutInflater.from(MainActivity.this).inflate(R.layout.about_dialog, null, false);
TextView version = (TextView) layout.findViewById(R.id.version);

version.setText(String.format("Version %s", MainActivity.this.getString(R.string.version)));
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
builder.setPositiveButton("Ok", null);
builder.setView(layout);

final AlertDialog dialog = builder.create();
dialog.setCanceledOnTouchOutside(true);
dialog.setCancelable(true);
dialog.show();

break;

}

Expand Down
70 changes: 70 additions & 0 deletions ShapeRippleExample/src/main/res/layout/about_dialog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">

<!--<TextView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="Copyright 2015, Rodolfo Navalon"-->
<!--android:layout_below="@+id/version"-->
<!--android:layout_alignParentRight="true"-->
<!--android:layout_alignParentEnd="true" />-->


<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="Shape Ripple for Android"
android:textStyle="bold" />


<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/textView6"
android:text="Version 0.1.0"
android:layout_toLeftOf="@+id/imageView"
android:layout_toStartOf="@+id/imageView" />


<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/version"
android:text="Copyright 2016, Rodolfo Navalon"
android:layout_toLeftOf="@+id/imageView"
android:layout_toStartOf="@+id/imageView" />

<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/version"
android:layout_marginTop="25dp"
android:text="@string/about_description" />

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/textView6"
android:src="@mipmap/ic_launcher" />

</RelativeLayout>
6 changes: 4 additions & 2 deletions ShapeRippleExample/src/main/res/menu/nav_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@

<item android:title="Source">
<menu>
<item android:title="GitHub" />
<item android:title="About" />
<item android:title="GitHub"
android:id="@+id/nav_github"/>
<item android:title="About"
android:id="@+id/nav_about"/>
</menu>
</item>
</menu>
5 changes: 5 additions & 0 deletions ShapeRippleExample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
<string name="ripple_star">Star Ripple</string>
<string name="ripples">Ripples</string>

<string name="version">0.1.0</string>

<string name="about_description">It is a library that renders an awesome ripple effect with an ability to customize the shapes.
\n\nIt can do a lot of things such as random colors, random position, enable single ripple and more to come in the future.</string>

</resources>

0 comments on commit 3c826cf

Please sign in to comment.