{"id":13537979,"url":"https://github.com/maurycyw/StaggeredGridView","last_synced_at":"2025-04-02T04:32:03.435Z","repository":{"id":5919853,"uuid":"7139407","full_name":"maurycyw/StaggeredGridView","owner":"maurycyw","description":"A modified version of Android's experimental StaggeredGridView. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.","archived":false,"fork":false,"pushed_at":"2014-06-17T00:17:48.000Z","size":808,"stargazers_count":1642,"open_issues_count":46,"forks_count":664,"subscribers_count":149,"default_branch":"develop","last_synced_at":"2025-03-25T10:09:18.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/maurycyw/StaggeredGridViewDemo","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/maurycyw.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":"2012-12-12T23:12:15.000Z","updated_at":"2025-03-13T04:05:43.000Z","dependencies_parsed_at":"2022-09-24T00:11:41.762Z","dependency_job_id":null,"html_url":"https://github.com/maurycyw/StaggeredGridView","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/maurycyw%2FStaggeredGridView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurycyw%2FStaggeredGridView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurycyw%2FStaggeredGridView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurycyw%2FStaggeredGridView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maurycyw","download_url":"https://codeload.github.com/maurycyw/StaggeredGridView/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246540520,"owners_count":20793930,"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-08-01T09:01:05.474Z","updated_at":"2025-04-02T04:32:03.395Z","avatar_url":"https://github.com/maurycyw.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"StaggeredGridView\n=======\n\n## Introduction\n\nThis is a modified version of Android's experimental StaggeredGridView. The StaggeredGridView allows the user to create a GridView with uneven rows similar to how Pinterest looks. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.\n\n## Setup\n\nTo use StaggeredGridView in your projects, simply add this project to your workspace then add it as a library project to your current project. \n\n## Usage\n\nStaggeredGridView can be added as a custom view to any layout. \n\nAttributes supported (same behavior as GridView): \n * numColumns : determines the amount of columns to be drawn\n * drawSelectorOnTop : determine if selector should be drawn on top\n\n```xml\n\n\u003cLinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    xmlns:staggered=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:id=\"@+id/mainLayout\"\u003e\n\n    \u003ccom.origamilabs.library.views.StaggeredGridView\n        android:id=\"@+id/staggeredGridView1\"\n        staggered:numColumns=\"2\"\n        staggered:drawSelectorOnTop=\"true\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" /\u003e\n\n\u003c/LinearLayout\u003e\n```\nThe StaggeredGridView includes its own interface's OnItemClickListener, and OnItemLongClickListener since StaggeredGridView does not extend an AdapterView. Behavior is the same.\n\n```java\n\nonItemClick(StaggeredGridView parent, View view, int position, long id);\n\nonItemLongClick(StaggeredGridView parent, View view, int position, long id);\n```\n\n## Tests\n\nNo tests have been written however I have tested this View manually with 2.2.2+ devices. Please report any issues.\n\n\n## TODO:\n\n* implement more custom attributes to mirror GridView's attributes\n* develop tests\n* hideSelector()\n* support multiple choice mode\n* currently restoring position can result in the views to be slightly offset when user flings to the top. This is corrected by checking the offsets when position 0 is reached. Would like to dig deeper into the issue. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurycyw%2FStaggeredGridView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaurycyw%2FStaggeredGridView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurycyw%2FStaggeredGridView/lists"}