{"id":13639059,"url":"https://github.com/lurbas/ListItemView","last_synced_at":"2025-04-19T21:35:31.940Z","repository":{"id":74603700,"uuid":"85619024","full_name":"lurbas/ListItemView","owner":"lurbas","description":"Implementation of List Item from Material Design","archived":false,"fork":false,"pushed_at":"2018-06-15T15:45:52.000Z","size":480,"stargazers_count":570,"open_issues_count":2,"forks_count":65,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-09T09:38:02.536Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lurbas.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,"roadmap":null,"authors":null}},"created_at":"2017-03-20T19:45:38.000Z","updated_at":"2024-09-20T02:57:37.000Z","dependencies_parsed_at":"2024-01-14T11:14:59.274Z","dependency_job_id":null,"html_url":"https://github.com/lurbas/ListItemView","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurbas%2FListItemView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurbas%2FListItemView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurbas%2FListItemView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurbas%2FListItemView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lurbas","download_url":"https://codeload.github.com/lurbas/ListItemView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249811209,"owners_count":21328763,"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-02T01:00:57.218Z","updated_at":"2025-04-19T21:35:31.611Z","avatar_url":"https://github.com/lurbas.png","language":"Java","funding_links":[],"categories":["ListView"],"sub_categories":[],"readme":"# ListItemView\n[![Build Status](https://travis-ci.org/lurbas/ListItemView.svg?branch=master)](https://travis-ci.org/lurbas/ListItemView)\n\nImplementation of List Item from Material Design [guidelines](https://material.io/guidelines/components/lists.html#lists-specs).\n\n### Screenshot\n![](https://github.com/lurbas/ListItemView/blob/master/readme/cover.png)\n\n### Usage\n```xml\n\u003ccom.lucasurbas.listitemview.ListItemView\n        android:id=\"@+id/list_item_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:liv_title=\"@string/title\"\n        app:liv_subtitle=\"@string/subtitle\"\n        app:liv_icon=\"@drawable/ic_call_24dp\"\n        app:liv_menu=\"@menu/single_action_menu\"\n        app:liv_multiline=\"false\"\n        app:liv_displayMode=\"icon\"/\u003e\n```\n\n#### Action Menu\nRight action icon is configured from xml menu file similar to toolbar configuration.\n```\napp:liv_menu=\"@menu/multiple_action_menu\"\n```\nxml file\n```xml\n\u003cmenu xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n\n    \u003citem\n        android:id=\"@+id/action_heart\"\n        android:icon=\"@drawable/ic_favorite_24dp\"\n        android:title=\"@string/action_heart\"\n        app:showAsAction=\"always\" /\u003e\n    \u003citem\n        android:id=\"@+id/action_info\"\n        android:icon=\"@drawable/ic_info_24dp\"\n        android:title=\"@string/action_info\"\n        app:showAsAction=\"ifRoom\" /\u003e\n    \u003citem\n        android:id=\"@+id/action_remove\"\n        android:title=\"@string/action_remove\"\n        app:showAsAction=\"never\" /\u003e\n\u003c/menu\u003e\n```\nadd onClick listener\n```java\nlistItemView.setOnMenuItemClickListener(new ListItemView.OnMenuItemClickListener() {\n        @Override\n        public void onActionMenuItemSelected(final MenuItem item) {\n            // click\n        }\n    });\n```\n\n#### Padding and Keyline\n```\napp:liv_paddingStart=\"@dimen/padding_start\"\napp:liv_paddingEnd=\"@dimen/padding_end\"\napp:liv_keyline=\"@dimen/keyline\"\n```\nBy default `liv_paddingStart` and `liv_paddingEnd` are set to **16dp** on mobile and **24dp** on tablet.\nKeyline `liv_keyline` is a line to which text will be offset when icon or avatar is present. Default value is **72dp** on mobile and **80dp** on tablet.\nThe view is RTL ready.\n\nIt is possible to offset text without setting icon, by using **liv_forceKeyline** flag\n```\napp:liv_forceKeyline=\"true\"\n```\n![](https://github.com/lurbas/ListItemView/blob/master/readme/keyline.png)\n\n#### Circular Icon\n```\napp:liv_displayMode=\"circularIcon\"\n```\n![](https://github.com/lurbas/ListItemView/blob/master/readme/circular_icon.png)\n\n#### Avatar\n```\napp:liv_displayMode=\"avatar\"\n```\nnext you can get the `ImageView` and download into it an image using library of your choice (Picasso, Glide, etc).\n\u003cpre\u003e\nPicasso.with(context)\n        .load(avaratUrl)\n        .placeholder(R.drawable.placeholder)\n        .transform(new CropCircleTransform())\n        .into(\u003cb\u003elistItemView.getAvatarView()\u003c/b\u003e);\n\u003c/pre\u003e\n\n#### Styling\n\nTitle color uses `?android:textColorPrimary` and Subtitle uses `?android:textColorSecondary`. All icons by default are also tinted\nwith `?android:textColorSecondary` color. This means view can handle respectfully light and dark theme.\n\nTo change icons color use accordingly:\n```\napp:liv_iconColor=\"@color/icon_color\"\napp:liv_circularIconColor=\"@color/icon_color\"\napp:liv_menuActionColor=\"@color/icon_color\"\napp:liv_menuOverflowColor=\"@color/icon_color\"\n```\n\n### Download (JCenter)\n```gradle\ndependencies {\n    compile 'com.lucasurbas:listitemview:1.1.1'\n}\n```\n\n### License\n```\nCopyright 2017 Lucas Urbas\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flurbas%2FListItemView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flurbas%2FListItemView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flurbas%2FListItemView/lists"}