File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ Add this to your module build.gradle
11
11
dependencies {
12
12
compile 'com.tomer:fadingtextview:1.0'
13
13
}
14
-
15
14
```
16
15
17
16
First, you need to create a string-array in your values folder like so:
@@ -43,9 +42,25 @@ app:timeout="500"
43
42
44
43
``` xml
45
44
<com .tomer.fadingtextview.FadingTextView
45
+ android : id =" @+id/fadingTextView"
46
46
android : layout_width =" match_parent"
47
47
android : layout_height =" wrap_content"
48
48
android : height =" 64dp"
49
49
app : timeout =" 500"
50
50
app : texts =" @array/examples" />
51
51
```
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
+ ```
You can’t perform that action at this time.
0 commit comments