{"id":17680364,"url":"https://github.com/tbrand/oneitem","last_synced_at":"2025-10-28T05:37:09.156Z","repository":{"id":75519197,"uuid":"83180243","full_name":"tbrand/OneItem","owner":"tbrand","description":"Simple implementation for one item selected RecyclerView. This makes it easier to use arbitrary VideoView (such as MediaPlayer) in RecyclerView. This library includes RecyclerView.LayoutManager and Recyclerview.OnScrollListener.","archived":false,"fork":false,"pushed_at":"2017-02-26T04:06:19.000Z","size":130,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T01:56:46.922Z","etag":null,"topics":["android","linearlayoutmanager","recyclerview","recyclerview-adapter"],"latest_commit_sha":null,"homepage":"https://bintray.com/tbrandlib/maven/oneitem","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/tbrand.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-26T03:33:05.000Z","updated_at":"2022-04-29T04:46:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd8f7812-b78d-489d-a996-3119da99d495","html_url":"https://github.com/tbrand/OneItem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tbrand/OneItem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbrand%2FOneItem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbrand%2FOneItem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbrand%2FOneItem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbrand%2FOneItem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbrand","download_url":"https://codeload.github.com/tbrand/OneItem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbrand%2FOneItem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274250888,"owners_count":25249482,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","linearlayoutmanager","recyclerview","recyclerview-adapter"],"created_at":"2024-10-24T09:06:43.216Z","updated_at":"2025-10-28T05:37:04.124Z","avatar_url":"https://github.com/tbrand.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## OneItem\n\nSimple implementation for one item selected RecyclerView.\nThis makes it easier to use arbitrary VideoView (such as MediaPlayer) in RecyclerView.\nThis library includes RecyclerView.LayoutManager and Recyclerview.OnScrollListener.\n\nYou can realize auto-playing Video View like Facebook, Instagram, Twitter or other famous single column SNS by this library.\n\n## Sample\n\n\u003cimg src=\"https://raw.githubusercontent.com/tbrand/OneItem/master/imgs/sample.gif\" /\u003e\n\n## Usage\n\n### Install\n\nIn your top level `build.gradle`, add\n```\nallprojects {\n    repositories {\n\t\t...\n        maven { url  \"http://tbrandlib.bintray.com/maven\" }\n    }\n}\n```\n\nIn your application level `build.gradle`, add\n```\ndependencies {\n\tcompile 'com.tbrandlib.oneitem:oneitem:0.1.0'\n}\n```\n\n### In java code\n\nImplement `OneItemListener` in you RecyclerView.Adapter.\n```java\nMainAdapter extends RecyclerView.Adapter implements OneItemListener{\n\n\t/// This method is called when the item at the position is selected as the one item\n    @Override\n    public void selectItemAt(int position) {\n\t\n    }\n\n    // This method is called when the item at the position is unselected\n    @Override\n    public void unSelectItemAt(int position) {\n\t\n    }\n}\n```\n\nSetup OneItem with your RecyclerView.\n```java\n//MainAdapter implements OneItemListener\nMainAdapter adapter = new MainAdapter(this);\n\nRecyclerView recyclerView = (RecyclerView)findViewById(R.id.main_recycler_view);\nrecyclerView.setAdapter(adapter);\n\n//You can setup one item manager like this\nOneItemManager.setup(this, adapter, recyclerView);\n```\n\nNow you can get callback from OneItem to `#selectItemAt` and `#unSelectItemAt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbrand%2Foneitem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbrand%2Foneitem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbrand%2Foneitem/lists"}