Skip to content

Commit ecb813d

Browse files
authored
Updated docs, added new methods
1 parent e64e2ba commit ecb813d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Add this to your module build.gradle
1111
dependencies {
1212
   compile 'com.tomer:fadingtextview:1.0'
1313
}
14-
   
1514
```
1615

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

4443
``` xml
4544
<com.tomer.fadingtextview.FadingTextView
45+
android:id="@+id/fadingTextView"
4646
android:layout_width="match_parent"
4747
android:layout_height="wrap_content"
4848
android:height="64dp"
4949
app:timeout="500"
5050
app:texts="@array/examples" />
5151
```
52+
53+
### Getters & setters
54+
To set the text dynamically, you can use
55+
56+
```java
57+
String[] texts = {"text1","text2","text3"};
58+
FadingTextView FTV = (FadingTextView) findViewById(R.id.fadingTextView);
59+
FTV.setTexts(texts); //You can use an array resource or a string array as the parameter
60+
```
61+
62+
To set the timeout between text change in milliseconds you can use
63+
64+
```java
65+
FTV.setTimeOut(1000);
66+
```

0 commit comments

Comments
 (0)