File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ # FadingTextView
2
+ A textview that changes its content automatically every few seconds
3
+
4
+ ![ example] ( https://lh3.googleusercontent.com/VG5EYCttms05zRFrOxRk8FLz9t3rvR0Qi1dX12q6PCi_ZslrX0laeGAEIG1uNYFouKREnFrJ5HUSNroa8GO_N5FHpLsRlDw0otDIoU_GRP909fFA8lNXo4mwuaZkduomeOU7TeNIdD9VM7C27HytVQhZigfGxrFI9rDDQ-2fEx7ApA8L_bqlIfF494fNf4Ds6-IqHeitakZS3uFyazskihYmmJJcwto2p9kuUnpou3bTtENMf04ZeV3DFt7PikYGuBVB13zy-0TPJd_w1RkGx7AS2acNiGo4xgYksP8PBrmv8TxWm4wXH9uD82BbeDgszgWBzOA71LnT0Bh4OAWm8ln7uQTHGX9cOhm1q57_KRnRpLFiOR_aKVoaJbDAylzofsAXLQeSi9JMeh6iqHWAUJcWEJsQ4jRs5r-IDzYWZxzN2N8OAhoCcVJaXR1Y5HkpZFppso8S8OBdWJrS9J9DF4fiMNwEhi-qQ-LBitj8vVN3Gv8xUA5e9cRw4Duf2boqTumhP8jI5n98-rpDmXv2UoZGBEqSn9Gxx_m0b8FDmpCBjl04lEvcj20KM8TLRijLxeeRfNfCoctpKBOGLJRQj8lMqSzVQVkP1pgyweRArHc-_2rsugRiTB5RYv1GN9XhNM0upLsRHvHvbqFZ1qJOR0qAKjktyfvcBcvFuN9zjYg=w800-h231-no )
5
+
6
+ ##Usage
7
+
8
+ Add this to your module build.gradle
9
+
10
+ ``` compile 'com.tomer:fadingtextview:1.0' ```
11
+
12
+ First, you need to create a string-array in your values folder like so:
13
+
14
+ ``` xml
15
+ <string-array name =" examples" >
16
+ <item >Hello</item >
17
+ <item >Fading TextView</item >
18
+ </string-array >
19
+ ```
20
+
21
+ Then in your layout
22
+
23
+ ``` xml
24
+ <com .tomer.fadingtextview.FadingTextView
25
+ android : layout_width =" match_parent"
26
+ android : layout_height =" wrap_content"
27
+ android : height =" 64dp"
28
+ app : texts =" @array/examples" />
29
+ ```
30
+
31
+ ###Timeout
32
+
33
+ You can set the time you want each text to appear by using the timeout attribute and specify the length of time in milliseconds. Like so:
34
+
35
+ ``` xml
36
+ app:timeout="500"
37
+ ```
38
+
39
+ ``` xml
40
+ <com .tomer.fadingtextview.FadingTextView
41
+ android : layout_width =" match_parent"
42
+ android : layout_height =" wrap_content"
43
+ android : height =" 64dp"
44
+ app : timeout =" 500"
45
+ app : texts =" @array/examples" />
46
+ ```
You can’t perform that action at this time.
0 commit comments