{"id":21130296,"url":"https://github.com/alighters/CubeGrid","last_synced_at":"2025-07-09T01:33:05.621Z","repository":{"id":57719695,"uuid":"51140045","full_name":"alighters/CubeGrid","owner":"alighters","description":"Cube grid animation about the android.","archived":false,"fork":false,"pushed_at":"2016-07-22T02:32:56.000Z","size":146,"stargazers_count":216,"open_issues_count":0,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-11-07T15:23:43.146Z","etag":null,"topics":[],"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/alighters.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-02-05T10:24:45.000Z","updated_at":"2023-11-07T15:23:43.147Z","dependencies_parsed_at":"2022-09-26T21:40:53.294Z","dependency_job_id":null,"html_url":"https://github.com/alighters/CubeGrid","commit_stats":null,"previous_names":["david-wei/cubegrid"],"tags_count":19,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alighters%2FCubeGrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alighters%2FCubeGrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alighters%2FCubeGrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alighters%2FCubeGrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alighters","download_url":"https://codeload.github.com/alighters/CubeGrid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476370,"owners_count":17480215,"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":[],"created_at":"2024-11-20T05:32:32.917Z","updated_at":"2024-11-20T05:32:42.356Z","avatar_url":"https://github.com/alighters.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# CubeGrid\nCube grid animation about the android.\n\nThe android implementation about the [9-cube-grid](https://github.com/tobiasahlin/SpinKit/blob/master/examples/9-cube-grid.html)\n\n## Demo\n![test](http://7xpyth.com1.z0.glb.clouddn.com/cube1.gif)\n\n## Usage\n### Add dependency\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n         mavenCentral()\n\t\t}\n\t}\n\tdependencies {\n       compile 'com.lighters.cubegrid:cubegridlibray:1.2.4'\n\t}\n\t\n### Step 1\n```\n  \u003ccom.lighters.cubegridlibrary.view.CubeGridImageView\n      android:id=\"@+id/iv_cube_grid\"\n      android:layout_width=\"100dp\"\n      android:layout_height=\"100dp\"\n      android:padding=\"12dp\"\n      android:src=\"@drawable/ic_launcher\"\n      app:fillColor=\"#f00\"\n      app:loopCount=\"10\"\n      app:roundCornerSize=\"6dp\"/\u003e\n\n  \u003ccom.lighters.cubegridlibrary.view.CubeGridFrameLayout\n      android:id=\"@+id/fl_cube_grid\"\n      android:layout_width=\"80dp\"\n      android:layout_marginTop=\"100dp\"\n      android:layout_height=\"80dp\"\n      app:fillColor=\"#0f0\"\n      app:loopCount=\"10\"\n      app:roundCornerSize=\"6dp\"/\u003e\n```\n### Step 2\n```\npublic class MainActivity extends AppCompatActivity {\n\n    public final static String TAG = MainActivity.class.getName();\n\n    private CubeGridImageView mCubeGridImageView;\n    private CubeGridFrameLayout mCubeGridFrameLayout;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        init();\n    }\n\n    private void init() {\n        mCubeGridImageView = (CubeGridImageView) findViewById(R.id.iv_cube_grid);\n        mCubeGridFrameLayout = (CubeGridFrameLayout) findViewById(R.id.fl_cube_grid);\n        mCubeGridImageView.start(mImageAnimCallback);\n        new Handler().postDelayed(new Runnable() {\n            @Override\n            public void run() {\n                mCubeGridFrameLayout.start(mFrameLayoutAnimCallback);\n            }\n        }, 100);\n        new Handler().postDelayed(new Runnable() {\n            @Override\n            public void run() {\n                mCubeGridImageView.stop();\n            }\n        }, 5000);\n    }\n\n    private ICubeGridAnimCallback mImageAnimCallback = new ICubeGridAnimCallback() {\n        @Override\n        public void onAnimStart() {\n\n        }\n\n        @Override\n        public void onAnimExecute(int curLoopCount) {\n            Log.d(TAG, \"image loop:\" + curLoopCount);\n        }\n\n        @Override\n        public void onAnimEnd() {\n            Toast.makeText(MainActivity.this, \"ImageAnimEnd\", Toast.LENGTH_SHORT).show();\n        }\n    };\n\n    private ICubeGridAnimCallback mFrameLayoutAnimCallback = new ICubeGridAnimCallback() {\n        @Override\n        public void onAnimStart() {\n\n        }\n\n        @Override\n        public void onAnimExecute(int curLoopCount) {\n            Log.d(TAG, \"frame layout loop:\" + curLoopCount);\n        }\n\n        @Override\n        public void onAnimEnd() {\n            Toast.makeText(MainActivity.this, \"FrameAnimEnd\", Toast.LENGTH_SHORT).show();\n        }\n    };\n\n    @Override\n    protected void onDestroy() {\n        super.onDestroy();\n        mCubeGridImageView.destory();\n        mCubeGridFrameLayout.destroy();\n    }\n}\n```\n\n## LICENSE\n\n```\nCopyright (C) 2016 david.wei (lighters)\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 \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falighters%2FCubeGrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falighters%2FCubeGrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falighters%2FCubeGrid/lists"}