{"id":20009220,"url":"https://github.com/samlss/flaskview","last_synced_at":"2025-05-04T19:35:49.114Z","repository":{"id":201738148,"uuid":"152072197","full_name":"samlss/FlaskView","owner":"samlss","description":"🍼A flask loading view.","archived":false,"fork":false,"pushed_at":"2019-01-04T02:22:54.000Z","size":904,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T11:38:03.445Z","etag":null,"topics":["android","flaskloadingview","loadingview","view"],"latest_commit_sha":null,"homepage":"","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/samlss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-08T11:58:16.000Z","updated_at":"2022-08-17T08:49:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"8dad5914-6046-4694-bf11-1873f3c2e63f","html_url":"https://github.com/samlss/FlaskView","commit_stats":null,"previous_names":["samlss/flaskview"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FFlaskView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FFlaskView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FFlaskView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FFlaskView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samlss","download_url":"https://codeload.github.com/samlss/FlaskView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252390629,"owners_count":21740354,"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","flaskloadingview","loadingview","view"],"created_at":"2024-11-13T07:14:41.914Z","updated_at":"2025-05-04T19:35:48.691Z","avatar_url":"https://github.com/samlss.png","language":"Java","readme":"# FlaskView\n[![Download](https://api.bintray.com/packages/samlss/maven/flaskview/images/download.svg?version=1.0.0)](https://bintray.com/samlss/maven/flaskview/1.0.0/link)   [![Api reqeust](https://img.shields.io/badge/API-11+-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=11#l11)    [![Apache License 2.0](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/samlss/FlaskView/blob/master/LICENSE)  [![Blog](https://img.shields.io/badge/samlss-blog-orange.svg)](https://blog.csdn.net/Samlss)\n\nA flask loading view.\n\n### [More](https://github.com/samlss/FunnyViews)\n\n### [中文](https://blog.csdn.net/Samlss/article/details/82983992)\n\n\n\u003cbr/\u003e\n\n\n![gif1](https://github.com/samlss/FlaskView/blob/master/screenshots/screenshot1.gif)\n\n\u003cbr/\u003e\n\n![gif2](https://github.com/samlss/FlaskView/blob/master/screenshots/screenshot2.gif)\n\n\n\n------\n### Usage\n\n#### Gradle\nAdd it in your app build.gradle at the end of repositories:\n  ```java\n  dependencies {\n      implementation 'me.samlss:flaskview:1.0.0'\n  }\n  ```\n\n#### Maven\n```java\n\u003cdependency\u003e\n  \u003cgroupId\u003eme.samlss\u003c/groupId\u003e\n  \u003cartifactId\u003eflaskview\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n#### In layout.xml\n\n```java\n \u003cme.samlss.view.FlaskView\n          app:bubble_min_speed=\"1\"\n          app:bubble_max_speed=\"5\"\n          app:bubble_creation_interval=\"70\"\n          app:stroke_width=\"2dp\"\n          app:water_height_percent=\"0.8\"\n          app:bubble_color=\"#fffeaf\"\n          app:water_color=\"#2b7971\"\n          app:stroke_color=\"#b39696\"\n          app:bubble_max_number=\"50\"\n          app:bubble_min_radius=\"5\"\n          app:bubble_max_radius=\"10\"\n          android:layout_weight=\"1\"\n          android:layout_width=\"0dp\"\n          android:layout_height=\"match_parent\" /\u003e\n```\n\n#### In code\n```java\n flaskView.setBubbleColor(Color.parseColor(\"#fff36a\")); //Set the color of all the bubbles\n flaskView.setStrokeColor(Color.parseColor(\"#b9a4a4\")); //Set the stroke color of flask\n flaskView.setWaterColor(Color.parseColor(\"#3b537b\")); //Set the water color\n flaskView.setStrokeWidth(10); //Set the flask stroke width in pixel\n flaskView.setBubbleCreationInterval(60); //Set the creation of the bubble interval in millis\n flaskView.setWaterHeightPercent(0.6f); //Set the water level to the percentage of the height of the flask, value is [0-1]\n\n flaskView.start(); //Start animation\n flaskView.stop(); //Stop animation\n flaskView.release(); //Release the flask view\n```\n\n\n#### attr\n\n```java\n    \u003cdeclare-styleable name=\"FlaskView\"\u003e\n        \u003c!--The stroke color of flask--\u003e\n        \u003cattr name=\"stroke_color\" format=\"color\"\u003e\u003c/attr\u003e\n\n        \u003c!--The water color--\u003e\n        \u003cattr name=\"water_color\" format=\"color\"\u003e\u003c/attr\u003e\n\n        \u003c!--The bubble color--\u003e\n        \u003cattr name=\"bubble_color\" format=\"color\"\u003e\u003c/attr\u003e\n\n        \u003c!--The max radius of the bubbles--\u003e\n        \u003cattr name=\"bubble_max_radius\" format=\"integer\"\u003e\u003c/attr\u003e\n\n        \u003c!--The min radius of the bubbles--\u003e\n        \u003cattr name=\"bubble_min_radius\" format=\"integer\"\u003e\u003c/attr\u003e\n\n        \u003c!--The max speed of the bubbles--\u003e\n        \u003cattr name=\"bubble_max_speed\" format=\"float\"\u003e\u003c/attr\u003e\n\n        \u003c!--The min speed of the bubbles--\u003e\n        \u003cattr name=\"bubble_min_speed\" format=\"float\"\u003e\u003c/attr\u003e\n\n        \u003c!--Number of bubbles that can coexist at the same time--\u003e\n        \u003cattr name=\"bubble_max_number\" format=\"integer\"\u003e\u003c/attr\u003e\n\n        \u003c!--The creation of the bubble interval in millis--\u003e\n        \u003cattr name=\"bubble_creation_interval\" format=\"integer\"\u003e\u003c/attr\u003e\n\n        \u003c!--The stoke width of the flask--\u003e\n        \u003cattr name=\"stroke_width\" format=\"dimension\"\u003e\u003c/attr\u003e\n\n        \u003c!--The water level to the percentage of the height of the flask--\u003e\n        \u003cattr name=\"water_height_percent\" format=\"float\"\u003e\u003c/attr\u003e\n    \u003c/declare-styleable\u003e\n```\n\n### Optimization\nUse a fixed number of containers to recycle bubbles that are no longer in use. When need to create bubble, firstly get them from the recycled container. If there are bubbles in the recycled container, reuse the object, otherwise a new one will be created.[Read the code](https://github.com/samlss/FlaskView/blob/master/flaskview/src/main/java/me/samlss/view/FlaskView.java)\n\n\n### License\n\n```\nCopyright 2018 samlss\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fflaskview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamlss%2Fflaskview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fflaskview/lists"}