Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Readme updates merge
  • Loading branch information
rosenpin committed Jan 20, 2017
2 parents 26267a1 + ecb813d commit a6cd815
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Add this to your module build.gradle
dependencies {
   compile 'com.tomer:fadingtextview:1.0'
}
   
```

First, you need to create a string-array in your values folder like so:
Expand Down Expand Up @@ -43,9 +42,25 @@ app:timeout="500"

``` xml
<com.tomer.fadingtextview.FadingTextView
android:id="@+id/fadingTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:height="64dp"
app:timeout="500"
app:texts="@array/examples" />
```

### Getters & setters
To set the text dynamically, you can use

```java
String[] texts = {"text1","text2","text3"};
FadingTextView FTV = (FadingTextView) findViewById(R.id.fadingTextView);
FTV.setTexts(texts); //You can use an array resource or a string array as the parameter
```

To set the timeout between text change in milliseconds you can use

```java
FTV.setTimeOut(1000);
```

0 comments on commit a6cd815

Please sign in to comment.