{"id":13641312,"url":"https://github.com/Hitomis/FunGameRefresh","last_synced_at":"2025-04-20T07:32:50.968Z","repository":{"id":41374528,"uuid":"52857175","full_name":"Hitomis/FunGameRefresh","owner":"Hitomis","description":"[暂停维护]好玩的下拉刷新控件，让我们一起来回味童年","archived":false,"fork":false,"pushed_at":"2017-07-11T02:11:37.000Z","size":8703,"stargazers_count":1329,"open_issues_count":2,"forks_count":187,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-03T20:11:31.437Z","etag":null,"topics":["android","functional-programming","pull-to-refresh"],"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/Hitomis.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":"2016-03-01T07:28:09.000Z","updated_at":"2025-04-01T10:21:57.000Z","dependencies_parsed_at":"2022-08-31T22:41:52.844Z","dependency_job_id":null,"html_url":"https://github.com/Hitomis/FunGameRefresh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hitomis%2FFunGameRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hitomis%2FFunGameRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hitomis%2FFunGameRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hitomis%2FFunGameRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hitomis","download_url":"https://codeload.github.com/Hitomis/FunGameRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609648,"owners_count":21132916,"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","functional-programming","pull-to-refresh"],"created_at":"2024-08-02T01:01:19.691Z","updated_at":"2025-04-20T07:32:50.527Z","avatar_url":"https://github.com/Hitomis.png","language":"Java","readme":"# FunGameRefreshView\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-HitBlockRefresh-brightgreen.svg?style=flat)](http://android-arsenal.com/details/3/3253)\n\n有趣好玩的下拉刷新库, 你还记得小时候打的黑白掌上游戏机么？\n\n# Preview\n\n\u003cimg src=\"preview/HitBlock.gif\" width=\"350px\" /\u003e\n\u003cimg src=\"preview/BattleCity.gif\"  width=\"350px\" /\u003e\n\n# FunGame\n\n更新内容\u003cbr/\u003e\n2016-07-28\n- 当后台线程没有执行完毕的时候，松开手指，下拉刷新控件会回滚到游戏区域高度的位置，用户任然可以继续玩游戏。\n- 重新整理了游戏区域中央的字符显示逻辑，不会再出现字符闪改的问题。\n\n2016-08-01\n- 修复当后台线程执行时间太短导致动画执行错误并无法操作游戏的问题。\n\n2016-08-17\n- 扩展自定义属性，添加下拉头部控件中文字自定义。\n\n2016-12-02\n- FunGameRefreshView 支持 GridView, ListView, RecycleView 等一些控件\n- FunGameRefreshView 中只能放入一个子控件 \n- 修复游戏结束提示语未设置时，报错的问题\n- 修复下拉刷新头部手动控制不能完全滑动回去的问题 \n\n\u003cbr/\u003e\u003cbr/\u003e\n目前支持两种游戏：打砖块和打坦克\n    打砖块规则简单，没有接住小球即GameOver;\n    打坦克规则为：漏掉敌方坦克超过十辆或者与敌方坦克相撞即GameOver，看看你能不能坚持三分钟吧。嘿嘿~;\n\n# Usage\n\n    布局文件中：\n    \u003ccom.hitomi.refresh.view.FunGameRefreshView\n        android:id=\"@+id/refresh_hit_block\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:game_type=\"hit_block\"\u003e\n                \n        \u003cListView\n            android:id=\"@+id/list_view\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"fill_parent\"\n            android:scrollbars=\"none\"\u003e\n        \u003c/ListView\u003e\n        \n    \u003c/com.hitomi.refresh.view.FunGameRefreshView\u003e\n\n    Activity中：\n        refreshView = (FunGameRefreshView) findViewById(R.id.refresh_fun_game);\n        listView = (ListView) findViewById(R.id.list_view);\n\n        arrayAdapter = new ArrayAdapter\u003cString\u003e(this, android.R.layout.simple_expandable_list_item_1, createDate());\n        listView.setAdapter(arrayAdapter);\n        \n        refreshView.setOnRefreshListener(new FunGameRefreshView.FunGameRefreshListener() {\n            @Override\n            public void onPullRefreshing() {\n                // 模拟后台耗时任务\n                SystemClock.sleep(2000);\n            }\n\n            @Override\n            public void onRefreshComplete() {\n                updateDataList();\n                arrayAdapter.notifyDataSetChanged();\n            }\n        });\n        \n具体示例代码，请查看 [fungamerefreshdemo](https://github.com/Hitomis/FunGameRefresh/tree/master/fungamerefreshdemo/src/main/java/com/hitomi/fungamerefreshdemo) 包中的代码\n\n# Attributes\n\n    支持下拉头部控件中游戏切换：\n        \u003cattr name=\"game_type\" format=\"enum\"\u003e\n            \u003cenum name=\"hit_block\" value=\"0\" /\u003e\n            \u003cenum name=\"battle_city\" value=\"1\" /\u003e\n        \u003c/attr\u003e\n\n    支持游戏中各部分模型颜色自定义：\n        \u003cattr name=\"left_model_color\" format=\"color\" /\u003e\n        \u003cattr name=\"middle_model_color\" format=\"color\" /\u003e\n        \u003cattr name=\"right_model_color\" format=\"color\" /\u003e\n\n    支持下拉头部控件中文字自定义：\n        \u003cattr name=\"mask_top_text\" format=\"string\" /\u003e\n        \u003cattr name=\"mask_bottom_text\" format=\"string\" /\u003e\n        \u003cattr name=\"text_loading\" format=\"string\" /\u003e\n        \u003cattr name=\"text_loading_finished\" format=\"string\" /\u003e\n        \u003cattr name=\"text_game_over\" format=\"string\" /\u003e\n\n        \u003cattr name=\"top_text_size\" format=\"integer\" /\u003e\n        \u003cattr name=\"bottom_text_size\" format=\"integer\" /\u003e\n\n    支持HitBlock游戏中砖块列数和小球速度自定义：        \n        \u003cattr name=\"block_horizontal_num\" format=\"integer\" /\u003e\n        \u003cattr name=\"ball_speed\" format=\"integer\"\u003e\n            \u003cenum name=\"low\" value=\"3\" /\u003e\n            \u003cenum name=\"medium\" value=\"6\" /\u003e\n            \u003cenum name=\"fast\" value=\"9\" /\u003e\n        \u003c/attr\u003e\n\n\n#Thanks\n\nUI设计来自于：https://github.com/dasdom/BreakOutToRefresh\n\n#Licence\n\nMIT \n\n\n\n","funding_links":[],"categories":["Java","下拉刷新"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHitomis%2FFunGameRefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHitomis%2FFunGameRefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHitomis%2FFunGameRefresh/lists"}