{"id":13396261,"url":"https://github.com/elevenetc/TextSurface","last_synced_at":"2025-03-13T22:31:56.886Z","repository":{"id":41259820,"uuid":"44141533","full_name":"elevenetc/TextSurface","owner":"elevenetc","description":"A little animation framework which could help you to show message in a nice looking way","archived":false,"fork":false,"pushed_at":"2021-02-17T01:52:27.000Z","size":2418,"stargazers_count":2364,"open_issues_count":9,"forks_count":247,"subscribers_count":69,"default_branch":"master","last_synced_at":"2024-10-29T17:47:13.336Z","etag":null,"topics":["android","android-library","android-ui","animation","animation-framework"],"latest_commit_sha":null,"homepage":"","language":"Java","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/elevenetc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-13T00:21:46.000Z","updated_at":"2024-10-27T09:25:28.000Z","dependencies_parsed_at":"2022-07-16T23:46:17.095Z","dependency_job_id":null,"html_url":"https://github.com/elevenetc/TextSurface","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenetc%2FTextSurface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenetc%2FTextSurface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenetc%2FTextSurface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevenetc%2FTextSurface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elevenetc","download_url":"https://codeload.github.com/elevenetc/TextSurface/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243494097,"owners_count":20299766,"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","android-ui","animation","animation-framework"],"created_at":"2024-07-30T18:00:43.314Z","updated_at":"2025-03-13T22:31:56.476Z","avatar_url":"https://github.com/elevenetc.png","language":"Java","readme":"# TextSurface\n\nA little animation framework which could help you to show message in a nice looking way.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"docs/demo.gif\"/\u003e\u003c/p\u003e\n\n### Usage\n\n1. Create [`TextSurface`](library/src/main/java/su/levenetc/android/textsurface/TextSurface.java) instance or add it in your layout.\n2. Create [`Text`](library/src/main/java/su/levenetc/android/textsurface/Text.java) instancies with [`TextBuilder`](library/src/main/java/su/levenetc/android/textsurface/TextBuilder.java) defining appearance of text and position:\n\n  ```Java\n  Text textDaai = TextBuilder\n  \t\t.create(\"Daai\")\n  \t\t.setSize(64)\n  \t\t.setAlpha(0)\n  \t\t.setColor(Color.WHITE)\n  \t\t.setPosition(Align.SURFACE_CENTER).build();\n  ```\n  \n3. Create animations and pass them to the [`TextSurface`](library/src/main/java/su/levenetc/android/textsurface/TextSurface.java) instance:\n  ```Java\n  textSurface.play(\n  \t\tnew Sequential(\n  \t\t\t\tSlide.showFrom(Side.TOP, textDaai, 500),\n  \t\t\t\tDelay.duration(500),\n  \t\t\t\tAlpha.hide(textDaai, 1500)\n  \t\t)\n  );\n  ```\n  \nSee full sample [`here`](app/src/main/java/su/levenetc/android/textsurface/sample/checks/CookieThumperSample.java).\n  \n### Adjusting animations\n\n- To play animations sequentially use [`Sequential.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Sequential.java)\n- To play animations simultaneously use [`Parallel.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Parallel.java)\n- Animations/effects could be combined like this:\n\n  ```Java\n  new Parallel(Alpha.show(textA, 500), ChangeColor.to(textA, 500, Color.RED))\n  ```\n  i.e. alpha and color of text will be changed simultaneously in 500ms\n\n### Adding your own animations/effects\nThere're two basic classes which you could extend to add custom animation:\n- [`AbstractSurfaceAnimation.java`](library/src/main/java/su/levenetc/android/textsurface/animations/AbstractSurfaceAnimation.java) to animate basic parameters like `alpha`, `translation`, `scale` and others. (See [`Alpha.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Alpha.java) or [`ChangeColor.java`](library/src/main/java/su/levenetc/android/textsurface/animations/ChangeColor.java))\n- [`ITextEffect.java`](library/src/main/java/su/levenetc/android/textsurface/interfaces/ITextEffect.java) interface which could be used for more complex animations. (See [`Rotate3D.java`](library/src/main/java/su/levenetc/android/textsurface/animations/Rotate3D.java) or [`ShapeReveal.java`](library/src/main/java/su/levenetc/android/textsurface/animations/ShapeReveal.java))\n\n### Proguard configuration\nThe framework is based on standard android animation classes which uses `reflection` extensively. To avoid obfuscation you need to exclude classes of the framework:\n```\n-keep class su.levenetc.android.textsurface.** { *; }\n```\n\n### Download\n```Groovy\nrepositories {\n    maven { url \"https://jitpack.io\" }\n}\n//...\ndependencies {\n    //...\n    compile 'com.github.elevenetc:textsurface:0.9.1'\n}\n```\n### Licence\nhttp://www.apache.org/licenses/LICENSE-2.0\n","funding_links":[],"categories":["Index `(light-weight pages)`","Index","Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felevenetc%2FTextSurface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felevenetc%2FTextSurface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felevenetc%2FTextSurface/lists"}