{"id":13645093,"url":"https://github.com/Kelin-Hong/ScrollablePanel","last_synced_at":"2025-04-21T13:31:44.410Z","repository":{"id":41879207,"uuid":"74944926","full_name":"Kelin-Hong/ScrollablePanel","owner":"Kelin-Hong","description":"A flexible view for providing a limited rect window into a large data set,just like a two-dimensional RecyclerView.  It different from RecyclerView is that it's two-dimensional(just like a Panel) and it pin the itemView of first row and first column in their original location.","archived":false,"fork":false,"pushed_at":"2019-05-06T06:38:30.000Z","size":3578,"stargazers_count":2085,"open_issues_count":32,"forks_count":310,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-04-08T10:34:41.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Kelin-Hong.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-11-28T06:41:44.000Z","updated_at":"2025-04-06T03:46:02.000Z","dependencies_parsed_at":"2022-08-31T05:03:40.076Z","dependency_job_id":null,"html_url":"https://github.com/Kelin-Hong/ScrollablePanel","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/Kelin-Hong%2FScrollablePanel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kelin-Hong%2FScrollablePanel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kelin-Hong%2FScrollablePanel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kelin-Hong%2FScrollablePanel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kelin-Hong","download_url":"https://codeload.github.com/Kelin-Hong/ScrollablePanel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250064681,"owners_count":21368948,"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:02:26.715Z","updated_at":"2025-04-21T13:31:43.746Z","avatar_url":"https://github.com/Kelin-Hong.png","language":"Java","readme":"# ScrollablePanel\n---\n\nA flexible view for providing a limited rect window into a large data set,just like a two-dimensional RecyclerView.\n\nIt different from RecyclerView is that it's two-dimensional(just like a Panel) and it pin the itemView of first row and first column in their original location.\n\n![ScrollablePanel Demo](art/ScrollablePanelDemo.gif) \n\n## Demo ##\n\nApk Download:[ScrollablePanelDemo.apk](art/ScrollablePanelDemo.apk) \n\n## Download ##\n\n```groovy\n  compile 'com.kelin.scrollablepanel:library:1.2.0' \n```\n\n## Usage ##\nScrollablePanel is very similar to the RecyclerView and we can use them in the same way.\n\n####1、Initialize ScrollablePanel\n```xml\n\u003ccom.kelin.scrollablepanel.library.ScrollablePanel\n        android:id=\"@+id/scrollable_panel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" /\u003e\n```\n\n####2、Adapter\n\nThis adapter must extend a class called PanelAdapter,We now have to override following methods so that we can implement our logic.\n```java \npublic class TestPanelAdapter extends PanelAdapter {\n    private List\u003cList\u003cString\u003e\u003e data;\n\n    @Override\n    public int getRowCount() {\n        return data.size();\n    }\n\n    @Override\n    public int getColumnCount() {\n        return data.get(0).size();\n    }\n\n    @Override\n    public int getItemViewType(int row, int column) {\n        return super.getItemViewType(row, column);\n    }\n\n    @Override\n    public void onBindViewHolder(RecyclerView.ViewHolder holder, int row, int column) {\n        String title = data.get(row).get(column);\n        TitleViewHolder titleViewHolder = (TitleViewHolder) holder;\n        titleViewHolder.titleTextView.setText(title);\n    }\n\n    @Override\n    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n        return new TestPanelAdapter.TitleViewHolder(LayoutInflater.from(parent.getContext())\n                .inflate(R.layout.listitem_title, parent, false));\n    }\n\n    private static class TitleViewHolder extends RecyclerView.ViewHolder {\n        public TextView titleTextView;\n\n        public TitleViewHolder(View view) {\n            super(view);\n            this.titleTextView = (TextView) view.findViewById(R.id.title);\n        }\n    }\n}\n```\n####3、Set Adapter\n```java\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n   ...\n   ...\n   TestPanelAdapter testPanelAdapter = new TestPanelAdapter();\n   ScrollablePanel scrollablePanel = (ScrollablePanel) findViewById(R.id.scrollable_panel);\n   scrollablePanel.setPanelAdapter(testPanelAdapter);\n   ...\n   ...\n}\n ```\n## ChangeLog ##\n\n-  V1.0.1 (2016-12-01) fix header scroll bug\n-  V1.1.0 (2016-12-21) fix desynchronisation between RV’s \u0026 fix dislocation of first column in every row!\n-  V1.2.0 (2016-12-26)  Add notifyDataSetChanged  \u0026 Fix auto reset to original position when first time scroll down!\n\n## License\n   ```\n    Copyright 2016 Kelin Hong\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   ```","funding_links":[],"categories":["表格(Table)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKelin-Hong%2FScrollablePanel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKelin-Hong%2FScrollablePanel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKelin-Hong%2FScrollablePanel/lists"}