Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bosphere committed Jan 19, 2017
1 parent 7829644 commit 181c7e4
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

Android-FadingEdgeLayout
============================

A versatile layout that fades its edges regardless of child view type.

#### What is available:
* Four fading edges that are individually configurable
* Length of fading edge is adjustable
* Supports any type of child `View`

<img src="./art/screenshot.png" width="500">

<img src="./art/anim.gif" width="480">

Usage
-----
```gradle
dependencies {
compile 'com.github.bosphere.android-fadingedgelayout:fadingedgelayout:1.0.0'
}
```

```xml
<com.bosphere.fadingedgelayout.FadingEdgeLayout
android:id="@+id/fading_edge_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:fel_edge="top|left|bottom|right"
app:fel_size_top="80dp"
app:fel_size_bottom="80dp"
app:fel_size_left="80dp"
app:fel_size_right="80dp">

<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

</com.bosphere.fadingedgelayout.FadingEdgeLayout>
```

```java
FadingEdgeLayout mFadingEdgeLayout = ...;
mFadingEdgeLayout.setFadeEdges(mEnableTop, mEnableLeft, mEnableBottom, mEnableRight);
mFadingEdgeLayout.setFadeSizes(lenPx, lenPx, lenPx, lenPx);
```

Compatibility
-------------

API 7 (Android 2.1) and up

License
-------

Copyright 2017 Yang Bo

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.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.bosphere.demo.MainActivity">
<activity android:name="com.bosphere.demo.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/bosphere/demo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ protected void onCreate(Bundle savedInstanceState) {
mRecyclerView.setAdapter(mAdapter);

SeekBar sb = (SeekBar) findViewById(R.id.sb_size);
sb.setProgress(20);
sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
Expand All @@ -55,7 +56,6 @@ public void onStartTrackingTouch(SeekBar seekBar) { }
@Override
public void onStopTrackingTouch(SeekBar seekBar) { }
});
sb.setProgress(20);
}

public void onClickedOrientation(View view) {
Expand Down
Binary file added art/anim.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 181c7e4

Please sign in to comment.