{"id":21039523,"url":"https://github.com/charonchui/pullrefresh-slidingmenu","last_synced_at":"2025-05-15T16:32:37.836Z","repository":{"id":12443100,"uuid":"15101425","full_name":"CharonChui/PullRefresh-SlidingMenu","owner":"CharonChui","description":"Bundle contains PullToRefreshListView、 SlidingMenu、 ScrollingTabs.","archived":false,"fork":false,"pushed_at":"2015-06-12T07:17:28.000Z","size":1420,"stargazers_count":29,"open_issues_count":0,"forks_count":30,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-03T11:23:06.405Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CharonChui.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":"2013-12-11T08:01:13.000Z","updated_at":"2019-06-17T09:33:28.000Z","dependencies_parsed_at":"2022-09-17T23:22:25.127Z","dependency_job_id":null,"html_url":"https://github.com/CharonChui/PullRefresh-SlidingMenu","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/CharonChui%2FPullRefresh-SlidingMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharonChui%2FPullRefresh-SlidingMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharonChui%2FPullRefresh-SlidingMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharonChui%2FPullRefresh-SlidingMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharonChui","download_url":"https://codeload.github.com/CharonChui/PullRefresh-SlidingMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254377303,"owners_count":22061115,"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-11-19T13:42:04.613Z","updated_at":"2025-05-15T16:32:37.332Z","avatar_url":"https://github.com/CharonChui.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"PullRefresh-SlidingMenu\n===\n\nBundle contains PullToRefreshListView、 SlidingMenu、 ScrollingTabs.\n\n                 \nPullToRefreshListView\n===\n\nA customizable ListView implementation that has 'Pull to Refresh' functionality. This ListView can be used as a replacement of the normal Android android.widget.ListView class.\n\n![image](https://raw.githubusercontent.com/CharonChui/AndroidNote/master/Pic/pullrefresh.gif)    \n\nUsage\n---\n\nCheck out the [example project](https://github.com/CharonChui/PullToRefreshListView) \nin this repository for an implementation example. \n\n1. Use PullToRefreshListView in your layout\n```xml\n\u003ccom.charon.pulltorefreshlistview.PullToRefreshListView\n\tandroid:id=\"@+id/ptlv\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"match_parent\" /\u003e\n```\n\n2. Setup in your Activity\n```java\nmPullToRefreshListView = (PullToRefreshListView) findViewById(R.id.ptlv);\nmPullToRefreshListView.setAdapter(adapter);\nmPullToRefreshListView.setOnRefreshListener(new OnRefreshListener() {\n\n\t@Override\n\tpublic void onRefresh() {\n\t\tnew AsyncTask\u003cVoid, Void, Void\u003e() {\n\n\t\t\t@Override\n\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t//TODO Refresh data.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t//Do not forget use this method after refreshed data.\n\t\t\t\tmPullToRefreshListView.onRefreshComplete();\n\t\t\t\n\t}\n});\n```\n\nSlidingMenu\n===\n\nSlidingMenu with left and right menu,This is an original component demo, does not rely on any third-party lib library.\n\n![image](https://raw.githubusercontent.com/CharonChui/PullRefresh-SlidingMenu/master/Pics/SlidingMenu.gif)  \n\nUsage\n===\n\n1. Include the SlidingMenu widget in your view.        \n\n```xml\n\u003ccom.charon.slidingmenu.view.SlidingMenu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/sm\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"match_parent\" \u003e\n\u003c/com.charon.slidingmenu.view.SlidingMenu\u003e\n```\t             \n\n2. In your `onCreate` method (or `onCreateView` for a fragment), bind the widget to the `SlidingMenu`.\n\n```java\nmSlidingMenu = (SlidingMenu) findViewById(R.id.sm);\n\n//prepare three view for the slidingmenu\nView leftView = View.inflate(this, R.layout.frame_left, null);\nView rightView = View.inflate(this, R.layout.frame_right, null);\nView centerView = View.inflate(this, R.layout.frame_center, null);\n\n//add the three view to SlidingMenu\nmSlidingMenu.setView(leftView, rightView, centerView, 200, 250);\n\n//replace the three view by three fragment\nFragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\nmLeftFragment = new LeftFragment();\ntransaction.replace(R.id.fl_left, mLeftFragment);\nmRightFragment = new RightFragment();\ntransaction.replace(R.id.fl_right, mRightFragment);\nmCenterFragment = new CenterFragment();\ntransaction.replace(R.id.fl_center, mCenterFragment);\ntransaction.commit();\n\n//set which side can show of SlidingMenu use the interface made by \nmCenterFragment.setOnViewPagerChangeListener(new OnViewPagerChangeListener() {\n\n\t@Override\n\tpublic void onPageChage(int position) {\n\t\tif (mCenterFragment.isFirst()) {\n\t\t\tmSlidingMenu.setWhichSideCanShow(true, false);\n\t\t} else if (mCenterFragment.isLast()) {\n\t\t\tmSlidingMenu.setWhichSideCanShow(false, true);\n\t\t} else {\n\t\t\tmSlidingMenu.setWhichSideCanShow(false, false);\n\t\t}\n\t}\n});\n\n//make two method for CenterFragment to use\npublic void showLeftViewToogle() {\n\tmSlidingMenu.showLeftViewToogle();\n}\n\npublic void showRightViewToogle() {\n\tmSlidingMenu.showRightViewToogle();\n}\n```\n\t\t\n\t\t\nScrollingTabs\n===\n\nInteractive paging indicator widget, compatible with the ViewPager from the Android Support Library.\n\n![image](https://raw.githubusercontent.com/CharonChui/PullRefresh-SlidingMenu/master/Pics/ScrollingTabs.gif)  \n\nUsage\n===\n\n1. Include the ScrollingTabsView widget in your view. This should usually be placed adjacent to the `ViewPager` it represents.\n\n```java\n\u003cLinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"48dp\"\n\tandroid:orientation=\"vertical\" \u003e\n\n\t\u003ccom.charon.scrollingtabs.view.ScrollingTabsView\n\t\tandroid:id=\"@+id/stv\"\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"wrap_content\" \u003e\n\t\u003c/com.charon.scrollingtabs.view.ScrollingTabsView\u003e\n\n\t\u003candroid.support.v4.view.ViewPager\n\t\tandroid:id=\"@+id/vp\"\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"match_parent\" \u003e\n\t\u003c/android.support.v4.view.ViewPager\u003e\n\n\u003c/LinearLayout\u003e\n```\n\n2. In your `onCreate` method (or `onCreateView` for a fragment), bind the widget to the `ViewPager`.\n\n```java\n // Set the pager with an adapter\n mViewPager = (ViewPager) findViewById(R.id.vp);\n\n mViewPager.setAdapter(new TestAdapter(getSupportFragmentManager()));\n\n // Bind the widget to the adapter\n mScrollingTabsView = (ScrollingTabsView) findViewById(R.id.stv);\n mScrollingTabsView.setViewPager(mViewPager);\n mScrollingTabsView.setTabAdapter(new MyTabAdapter()); \n```\n\nSimpleApp\n===\n\nSimpleApp using this three projects and [AndroidDevelopFramework](https://github.com/CharonChui/AndroidDevelopFramework)\n\n![image](https://raw.githubusercontent.com/CharonChui/PullRefresh-SlidingMenu/master/Pics/SimpleApp.gif)  \n\n\nDeveloped By\n===\n\n * Charon Chui - \u003ccharon.chui@gmail.com\u003e\n\n\nLicense\n===\n\n    Copyright (C) 2013 Charon Chui \u003ccharon.chui@gmail.com\u003e\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonchui%2Fpullrefresh-slidingmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharonchui%2Fpullrefresh-slidingmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonchui%2Fpullrefresh-slidingmenu/lists"}