{"id":13396119,"url":"https://github.com/felipecsl/AsymmetricGridView","last_synced_at":"2025-03-13T22:31:43.343Z","repository":{"id":15831956,"uuid":"18571888","full_name":"felipecsl/AsymmetricGridView","owner":"felipecsl","description":"Android ListView that mimics a GridView with asymmetric items. Supports items with row span and column span","archived":false,"fork":false,"pushed_at":"2018-10-13T16:11:11.000Z","size":4873,"stargazers_count":1838,"open_issues_count":35,"forks_count":431,"subscribers_count":84,"default_branch":"master","last_synced_at":"2025-03-08T08:44:50.261Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://felipecsl.com/AsymmetricGridView","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipecsl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-08T19:25:37.000Z","updated_at":"2024-12-28T06:12:19.000Z","dependencies_parsed_at":"2022-08-07T08:01:21.486Z","dependency_job_id":null,"html_url":"https://github.com/felipecsl/AsymmetricGridView","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/felipecsl%2FAsymmetricGridView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecsl%2FAsymmetricGridView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecsl%2FAsymmetricGridView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecsl%2FAsymmetricGridView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipecsl","download_url":"https://codeload.github.com/felipecsl/AsymmetricGridView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243493865,"owners_count":20299729,"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-07-30T18:00:40.677Z","updated_at":"2025-03-13T22:31:42.959Z","avatar_url":"https://github.com/felipecsl.png","language":"Java","funding_links":[],"categories":["Index `(light-weight pages)`","ListView","Index","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# AsymmetricGridView\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AsymmetricGridView-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1186)\n[![Build Status](https://travis-ci.org/felipecsl/AsymmetricGridView.svg?branch=master)](https://travis-ci.org/felipecsl/AsymmetricGridView)\n\nAn Android custom ListView that implements multiple columns and variable sized elements.\n\nPlease note that this is currently in a preview state.\nThis basically means that the API is not fixed and you should expect changes between releases.\n\n## Sample application:\n\nTry out the sample application on [Google Play](https://play.google.com/store/apps/details?id=com.felipecsl.asymmetricgridview.app)\n\n[![Gplay](https://developer.android.com/images/brand/en_generic_rgb_wo_60.png)](https://play.google.com/store/apps/details?id=com.felipecsl.asymmetricgridview.app)\n\n### Screenshots:\n\n![screenshot 1](https://raw.githubusercontent.com/felipecsl/AsymmetricGridView/master/screenshots/ss_2_cols.png)\n![screenshot 2](https://raw.githubusercontent.com/felipecsl/AsymmetricGridView/master/screenshots/ss_3_cols.png)\n![screenshot 3](https://raw.githubusercontent.com/felipecsl/AsymmetricGridView/master/screenshots/ss_4_cols.png)\n![screenshot 4](https://raw.githubusercontent.com/felipecsl/AsymmetricGridView/master/screenshots/ss_5_cols.png)\n\n### Usage\n\nVersion 2.0.0 includes a major breaking change to the AsymmetricGridViewAdapter. You now provide\nyour own adapter to the AsymmetricGridViewAdapter constructor instead of extending it.\n\nIn your ``build.gradle`` file:\n\n```groovy\ndependencies {\n    implementation 'com.felipecsl.asymmetricgridview:library:2.0.1'\n}\n```\n\nIn your layout xml:\n\n```xml\n\u003ccom.felipecsl.asymmetricgridview.library.widget.AsymmetricGridView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/listView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"/\u003e\n```\n\nIn your activity class:\n\n```java\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n    listView = (AsymmetricGridView) findViewById(R.id.listView);\n\n    // Choose your own preferred column width\n    listView.setRequestedColumnWidth(Utils.dpToPx(this, 120));\n    final List\u003cAsymmetricItem\u003e items = new ArrayList\u003c\u003e();\n\n    // initialize your items array\n    adapter = new ListAdapter(this, listView, items);\n    AsymmetricGridViewAdapter asymmetricAdapter =\n        new AsymmetricGridViewAdapter\u003c\u003e(this, listView, adapter);\n    listView.setAdapter(asymmetricAdapter);\n}\n```\n\nWhenever your adapter changes (add or remove items), the grid will automatically reflect those\nchanges by subscribing to your adapter changes.\n\nToggle to enable/disable reordering of elements to better fill the grid\n\n```java\n// Setting to true will move items up and down to better use the space\n// Defaults to false.\nlistView.setAllowReordering(true);\n\nlistView.isAllowReordering(); // true\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository](https://oss.sonatype.org/content/repositories/snapshots/).\n\nWorks with Android 2.3.x and above.\n\n### Caveats\n\n* Currently only has good support for items with rowSpan = 2 and columnSpan = 2.\nIn the near future it will support different layout configurations.\n\n* It will work best if you don't have too many items with different sizes. Ideally less\nthan 20% of your items are of special sizes, otherwise the library may not find the best\nway to accommodate all the items without leaving a lot of empty space behind.\n\n* Row layout is too complex, with many nested LinearLayouts. Move to a more flat layout\nwith a custom ViewGroup possibly.\n\n### Contributing\n\n* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet\n* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it\n* Fork the project\n* Start a feature/bugfix branch\n* Commit and push until you are happy with your contribution\n* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.\n\n### Copyright and license\n\nCode and documentation copyright 2011-2015 Felipe Lima.\nCode released under the [MIT license](https://github.com/felipecsl/AsymmetricGridview/blob/master/LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipecsl%2FAsymmetricGridView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipecsl%2FAsymmetricGridView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipecsl%2FAsymmetricGridView/lists"}