File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-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
+ ``` gradle
11
+ dependencies {
12
+ compile 'com.tomer:fadingtextview:1.0'
13
+ }
14
+
15
+ ```
16
+
17
+ First, you need to create a string-array in your values folder like so:
18
+
19
+ ``` xml
20
+ <string-array name =" examples" >
21
+ <item >Hello</item >
22
+ <item >Fading TextView</item >
23
+ </string-array >
24
+ ```
25
+
26
+ Then in your layout
27
+
28
+ ``` xml
29
+ <com .tomer.fadingtextview.FadingTextView
30
+ android : layout_width =" match_parent"
31
+ android : layout_height =" wrap_content"
32
+ android : height =" 64dp"
33
+ app : texts =" @array/examples" />
34
+ ```
35
+
36
+ ###Timeout
37
+
38
+ 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:
39
+
40
+ ``` xml
41
+ app:timeout="500"
42
+ ```
43
+
44
+ ``` xml
45
+ <com .tomer.fadingtextview.FadingTextView
46
+ android : layout_width =" match_parent"
47
+ android : layout_height =" wrap_content"
48
+ android : height =" 64dp"
49
+ app : timeout =" 500"
50
+ app : texts =" @array/examples" />
51
+ ```
You can’t perform that action at this time.
0 commit comments