{"id":13644369,"url":"https://github.com/rosenpin/fading-text-view","last_synced_at":"2025-05-15T17:03:18.691Z","repository":{"id":54351401,"uuid":"75960083","full_name":"rosenpin/fading-text-view","owner":"rosenpin","description":"A TextView that changes its content automatically every few seconds","archived":false,"fork":false,"pushed_at":"2023-12-29T16:56:35.000Z","size":962,"stargazers_count":1738,"open_issues_count":2,"forks_count":222,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-05-11T07:59:26.690Z","etag":null,"topics":["android","android-library","animation","textview"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rosenpin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["rosenpin"],"custom":["https://www.paypal.com/donate/?hosted_button_id=9M8LL9GJXELBN"]}},"created_at":"2016-12-08T17:30:56.000Z","updated_at":"2025-04-30T03:06:23.000Z","dependencies_parsed_at":"2023-11-15T12:31:11.796Z","dependency_job_id":"baebda13-958d-412a-aeaf-252c2704b2d1","html_url":"https://github.com/rosenpin/fading-text-view","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosenpin%2Ffading-text-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosenpin%2Ffading-text-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosenpin%2Ffading-text-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosenpin%2Ffading-text-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosenpin","download_url":"https://codeload.github.com/rosenpin/fading-text-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254384937,"owners_count":22062421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","animation","textview"],"created_at":"2024-08-02T01:02:01.996Z","updated_at":"2025-05-15T17:03:18.675Z","avatar_url":"https://github.com/rosenpin.png","language":"Kotlin","funding_links":["https://github.com/sponsors/rosenpin","https://www.paypal.com/donate/?hosted_button_id=9M8LL9GJXELBN"],"categories":["TextView"],"sub_categories":[],"readme":"# FadingTextView\n[![](https://jitpack.io/v/rosenpin/fading-text-view.svg)](https://jitpack.io/#rosenpin/fading-text-view)\n\u003ca target=\"_blank\" href=\"https://rosenpin.github.io/fading-text-view/fadingtextview/com.tomer.fadingtextview/-fading-text-view/index.html\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-FadingTextView-yellowgreen.svg\" alt=\"DOCS\" /\u003e\u003c/a\u003e \n\u003ca target=\"_blank\" href=\"https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#GINGERBREAD\"\u003e\u003cimg src=\"https://img.shields.io/badge/API-15%2B-blue.svg?style=flat\" alt=\"API\" /\u003e\u003c/a\u003e \n\u003ca target=\"_blank\" href=\"https://www.paypal.com/donate/?hosted_button_id=9M8LL9GJXELBN\" title=\"Donate using PayPal\"\u003e\u003cimg src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" /\u003e\u003c/a\u003e\n\nA TextView that changes its content automatically every few seconds\n\n![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)\n\n## Usage\n\n### Download\nFadingTextView is available on [JitPack](https://jitpack.io/#rosenpin/fading-text-view/3.3)\n\nStep 1. Add the JitPack repository to your root build.gradle\n``` gradle\nallprojects {\n  repositories {\n     ...\n     maven { url 'https://jitpack.io' }\n  }\n}\n```\n\nStep 2. Add the dependency\n``` gradle\ndependencies {\n    implementation 'com.github.rosenpin:fading-text-view:3.3'\n}\n ```\n\n### Texts\n\nFirst, you need to create a string-array in your values folder like so:\n\n``` xml\n\u003cstring-array name=\"examples\"\u003e\n     \u003citem\u003eHello\u003c/item\u003e\n     \u003citem\u003eFading TextView\u003c/item\u003e\n\u003c/string-array\u003e\n```\n\nThen in your layout\n\n```  xml\n\u003ccom.tomer.fadingtextview.FadingTextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:texts=\"@array/examples\" /\u003e\n```\n\n### Timeout\n\nYou can set the amount of time that each text is visible by using the timeout attribute and by specifying the length of time in milliseconds. Like so:\n\n``` xml\napp:timeout=\"500\"\n```\n\n```  xml\n\u003ccom.tomer.fadingtextview.FadingTextView\n            android:id=\"@+id/fadingTextView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:timeout=\"500\"\n            app:texts=\"@array/examples\" /\u003e\n```\n### Updating the view dynamically - Kotlin\nTo set the text dynamically, you can use\n\n```kotlin\nval texts = arrayOf(\"text1\", \"text2\", \"text3\")\nval fadingTextView = findViewById\u003cFadingTextView\u003e(R.id.fadingTextView)\nfadingTextView.setTexts(texts) // You can use an array resource or a string array as the parameter\n//fadingTextView.setTexts(R.array.examples)\n```\n\nTo set the timeout between text changes you can use:\n\n```kotlin\n//For text change once every hour\nfadingTextView.setTimeout(60.minutes)\n\n//For text change once every half a minute\nfadingTextView.setTimeout(0.5.minutes)\n\n//For text change every 10 seconds\nfadingTextView.setTimeout(10.seconds)\n\n//For text change every 500 milliseconds (0.5 seconds)\nfadingTextView.setTimeout(500.milliseconds)\n```\n\nOr you can shuffle texts that you set\n\n```kotlin\nfadingTextView.shuffle()\n```\n\n### Updating the view dynamically - JAVA\nTo set the text dynamically, you can use\n\n```java\nString[] texts = {\"text1\",\"text2\",\"text3\"};\nFadingTextView FTV = (FadingTextView) findViewById(R.id.fadingTextView);\nFTV.setTexts(texts); //You can use an array resource or a string array as the parameter\n```\n\nTo set the timeout between text changes you can use:\n\n```java\n//For text change once every hour\nFTV.setTimeout(60, MINUTES);\n\n//For text change once every half a minute\nFTV.setTimeout(0.5, MINUTES);\n\n//For text change every 10 seconds\nFTV.setTimeout(10, SECONDS);\n\n//For text change every 500 milliseconds (0.5 seconds)\nFTV.setTimeout(500, MILLISECONDS);\n```\n\n### Shuffle\nYou can randomize the order of the strings using the `shuffle` method\\\nNote: you will need to run the `shuffle` method after each time you update the view\\\nExample:\n```\nFTV.setTexts(texts);\nFTV.shuffle();\n```\n\n## Full Documentation\n\n[Click me](https://rosenpin.github.io/fading-text-view/) for the full documentation \n\n## License\n\n```\nCopyright (c) Tomer Rosenfeld 2016-2017\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosenpin%2Ffading-text-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosenpin%2Ffading-text-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosenpin%2Ffading-text-view/lists"}