update README

This commit is contained in:
bosphere
2017-01-19 21:18:22 +08:00
parent 7829644da0
commit 181c7e4987
6 changed files with 73 additions and 3 deletions

2
.idea/misc.xml generated
View File

@@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

69
README.md Normal file
View File

@@ -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.

View File

@@ -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"/>

View File

@@ -39,6 +39,7 @@ public class MainActivity extends AppCompatActivity {
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) {
@@ -55,7 +56,6 @@ public class MainActivity extends AppCompatActivity {
@Override
public void onStopTrackingTouch(SeekBar seekBar) { }
});
sb.setProgress(20);
}
public void onClickedOrientation(View view) {

BIN
art/anim.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

BIN
art/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB