{"id":13644339,"url":"https://github.com/robinhood/ticker","last_synced_at":"2025-05-14T02:08:26.356Z","repository":{"id":38237752,"uuid":"63452341","full_name":"robinhood/ticker","owner":"robinhood","description":"An Android text view with scrolling text change animation","archived":false,"fork":false,"pushed_at":"2023-11-23T18:03:23.000Z","size":1681,"stargazers_count":4387,"open_issues_count":18,"forks_count":465,"subscribers_count":82,"default_branch":"master","last_synced_at":"2025-05-11T14:48:55.694Z","etag":null,"topics":["android","android-animation","android-ui"],"latest_commit_sha":null,"homepage":"https://medium.com/robinhood-engineering/hello-ticker-20eaf6e51689","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robinhood.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-15T21:37:52.000Z","updated_at":"2025-05-11T11:59:34.000Z","dependencies_parsed_at":"2024-08-02T01:18:19.010Z","dependency_job_id":"29789477-4ef9-408c-ba6e-098e688b7069","html_url":"https://github.com/robinhood/ticker","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinhood%2Fticker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinhood%2Fticker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinhood%2Fticker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinhood%2Fticker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robinhood","download_url":"https://codeload.github.com/robinhood/ticker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053170,"owners_count":22006717,"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-animation","android-ui"],"created_at":"2024-08-02T01:02:01.521Z","updated_at":"2025-05-14T02:08:21.341Z","avatar_url":"https://github.com/robinhood.png","language":"Java","funding_links":[],"categories":["TextView"],"sub_categories":[],"readme":"![](https://github.com/robinhood/ticker/blob/master/assets/ticker_main.gif)\n\nMigrating to version 2\n======================\n\nThere are some breaking API changes introduced in ticker 2.0. Please refer to the\n[2.0 migration doc](https://github.com/robinhood/ticker/blob/master/2_0_migration.md).\n\n\nWhat is Ticker?\n===============\n\nTicker is a simple Android UI component for displaying scrolling text. Think about how an\nodometer scrolls when going from one number to the next, that is similar to what Ticker does.\nThe Ticker handles smooth animations between strings and also string resizing (e.g. animate\nfrom \"9999\" to \"10000\").\n\nYou can specify how the animations proceed by defining an array of characters in order. Each\ncharacter displayed by Ticker is controlled by this array which dictates how to animate from\na starting character to a target character. For example, if you just use a basic ASCII character\nlist, when animating from 'A' to 'Z', it will go from 'A' -\u003e 'B' -\u003e ... 'Z'. We will perform\nwrap-around animation when it's faster (e.g. 'Z' to 'A' will just animate 'Z' -\u003e 'A').\n\n\nGetting started\n---------------\n\nAdd the ticker dependency to your `build.gradle`.\n\n```groovy\nimplementation 'com.robinhood.ticker:ticker:2.0.4'\n```\n\n\nUsage\n-----\n\nDefine the `TickerView` in XML:\n\n```xml\n\u003ccom.robinhood.ticker.TickerView\n    android:id=\"@+id/tickerView\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\" /\u003e\n```\n\nThen add the character array to specify the animation style:\n\n```java\nfinal TickerView tickerView = findViewById(R.id.tickerView);\ntickerView.setCharacterLists(TickerUtils.provideNumberList());\n```\n\nThat's it! Now you can call `setText` to display your data.\n\n\nCustomization\n-------------\n\nWe currently support a fairly limited subset of customizations at the moment so please let us\nknow what new features / APIs you need exposed for your use-case and we'll consider it for\nfuture releases (or of course feel free to fork!).\n\nYou can customize the looks and feels of the `TickerView` via XML:\n\n```xml\nandroid:gravity=\"center\"\nandroid:textColor=\"@color/colorPrimary\"\nandroid:textSize=\"16sp\"\napp:ticker_animationDuration=\"1500\"\napp:ticker_preferredScrollingDirection=\"any\"\n```\n\nOr Java:\n\n```java\ntickerView.setTextColor(textColor);\ntickerView.setTextSize(textSize);\ntickerView.setTypeface(myCustomTypeface);\ntickerView.setAnimationDuration(500);\ntickerView.setAnimationInterpolator(new OvershootInterpolator());\ntickerView.setGravity(Gravity.START);\ntickerView.setPreferredScrollingDirection(TickerView.ScrollingDirection.ANY);\n```\n\nFor the full list of XML attributes that we support, please refer to the \n[attrs](https://github.com/robinhood/ticker/blob/master/ticker/src/main/res/values/attrs.xml) file.\n\n\nPerformance\n-----------\n\nWe decided to extend from the base `View` class and achieve everything by drawing directly\nonto the canvas. The primary benefit from this is having full flexibility and control over\nmemory allocations and minimize performance impact by using native draw operations. We\npre-allocate and pre-compute as much as possible for each transition so that the only thing\nwe need to do in the draw path is perform the actual drawing operations. The performance test\nUI included in the [ticker-sample](https://github.com/robinhood/ticker/tree/master/ticker-sample)\nis a bit over-zealous but animates smoothly with a screen full of tickers.\n\n\nLicense\n=======\n\n    Copyright 2016 Robinhood Markets, Inc.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinhood%2Fticker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinhood%2Fticker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinhood%2Fticker/lists"}