diff --git a/.gitignore b/.gitignore index 202d985..942d33f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ obj/ xam/ Resource.designer.cs .DS_Store +packages/ \ No newline at end of file diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/component/Details.md b/Components/xamandroidsupportv4-18-4.19.0.1/component/Details.md deleted file mode 100644 index 0537c93..0000000 --- a/Components/xamandroidsupportv4-18-4.19.0.1/component/Details.md +++ /dev/null @@ -1,17 +0,0 @@ -The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level. This design means that your applications can use the libraries' features and still be compatible with devices running old android flavors. - -Including the Support Libraries in your Android project is considered a best practice for application developers, depending on the range of platform versions your app is targeting and the APIs that it uses. Using the features the libraries provide can help you improve the look of your application, increase performance and broaden the reach of your application to more users. - -Changes for v4 support library Rev 19.0.1: - -- Improved PrintHelper by adding asynchronous handling of printing. -- Fixed the DrawerLayout class approximation of the AddChildrenForAccessibility() method. -- Fixed slide drawable mirroring in ActionBarDrawerToggle. -- Fixed off-by-one issue when removing an item from a collection iterator. - -*Portions of this page are modifications based on [work][3] created and [shared by the Android Open Source Project][1] and used according to terms described in the [Creative Commons 2.5 Attribution License][2].* - -[1]: http://code.google.com/policies.html -[2]: http://creativecommons.org/licenses/by/2.5/ -[3]: http://developer.android.com/tools/support-library/index.html - diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/component/GettingStarted.md b/Components/xamandroidsupportv4-18-4.19.0.1/component/GettingStarted.md deleted file mode 100644 index c08e18f..0000000 --- a/Components/xamandroidsupportv4-18-4.19.0.1/component/GettingStarted.md +++ /dev/null @@ -1,39 +0,0 @@ -v4 Support Library Rev 19.0.1 -============================= - -This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the largest set of APIs compared to the other libraries, including support for application components, user interface features, accessibility, data handling, network connectivity, and programming utilities. Here are a few of the key classes included in the v4 library: - -**App Components** - -- Fragment - Adds support encapsulation of user interface and functionality with Fragments, enabling applications provide layouts that adjust between small and large-screen devices. -- NotificationCompat - Adds support for rich notification features. -- LocalBroadcastManager - Allows applications to easily register for and receive intents within a single application without broadcasting them globally. - -**User Interface** - -- ViewPager - Adds a ViewGroup that manages the layout for the child views, which the user can swipe between. -- PagerTitleStrip - Adds a non-interactive title strip, that can be added as a child of ViewPager. -- PagerTabStrip - Adds a navigation widget for switching between paged views, that can also be used with ViewPager. -- DrawerLayout - Adds support for creating a Navigation Drawer that can be pulled in from the edge of a window. -- SlidingPaneLayout - Adds widget for creating linked summary and detail views that appropriately adapt to various screen sizes. - -**Accessibility** - -- ExploreByTouchHelper - Adds a helper class for implementing accessibility support for custom views. -- AccessibilityEventCompat - Adds support for AccessibilityEvent. For more information about implementing accessibility, see Accessibility. -- AccessibilityNodeInfoCompat - Adds support for AccessibilityNodeInfo. -- AccessibilityNodeProviderCompat - Adds support for AccessibilityNodeProvider. -- AccessibilityDelegateCompat - Adds support for View.AccessibilityDelegate. - -**Content** - -- Loader - Adds support for asynchronous loading of data. The library also provides concrete implementations of this class, including CursorLoader and AsyncTaskLoader. -- FileProvider - Adds support for sharing of private files between applications. - -There are many other APIs included in this library. For complete, detailed information about the v4 Support Library APIs, [see the android.support.v4](http://developer.android.com/reference/android/support/v4/app/package-summary.html). - -*Portions of this page are modifications based on [work][3] created and [shared by the Android Open Source Project][1] and used according to terms described in the [Creative Commons 2.5 Attribution License][2].* - -[1]: http://code.google.com/policies.html -[2]: http://creativecommons.org/licenses/by/2.5/ -[3]: http://developer.android.com/tools/support-library/features.html diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/component/License.md b/Components/xamandroidsupportv4-18-4.19.0.1/component/License.md deleted file mode 100644 index 0656c5c..0000000 --- a/Components/xamandroidsupportv4-18-4.19.0.1/component/License.md +++ /dev/null @@ -1,309 +0,0 @@ -``` -Packages -- Android Support Library, revision 18 - - -License Terms and Conditions - -This is the Android Software Development Kit License Agreement. - -1. Introduction - -1.1 The Android Software Development Kit (referred to in this License Agreement as the -"SDK" and specifically including the Android system files, packaged APIs, and Google APIs -add-ons) is licensed to you subject to the terms of this License Agreement. This License -Agreement forms a legally binding contract between you and Google in relation to your use -of the SDK. - -1.2 "Android" means the Android software stack for devices, as made available under the -Android Open Source Project, which is located at the following URL: -http://source.android.com/, as updated from time to time. - -1.3 "Google" means Google Inc., a Delaware corporation with principal place of business -at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. - - -2. Accepting this License Agreement - -2.1 In order to use the SDK, you must first agree to this License Agreement. You may not -use the SDK if you do not accept this License Agreement. - -2.2 By clicking to accept, you hereby agree to the terms of this License Agreement. - -2.3 You may not use the SDK and may not accept the License Agreement if you are a person -barred from receiving the SDK under the laws of the United States or other countries -including the country in which you are resident or from which you use the SDK. - -2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer -or other entity, you represent and warrant that you have full legal authority to bind your -employer or such entity to this License Agreement. If you do not have the requisite -authority, you may not accept the License Agreement or use the SDK on behalf of your -employer or other entity. - - -3. SDK License from Google - -3.1 Subject to the terms of this License Agreement, Google grants you a limited, -worldwide, royalty-free, non-assignable and non-exclusive license to use the SDK solely to -develop applications to run on the Android platform. - -3.2 You agree that Google or third parties own all legal right, title and interest in and -to the SDK, including any Intellectual Property Rights that subsist in the SDK. -"Intellectual Property Rights" means any and all rights under patent law, copyright law, -trade secret law, trademark law, and any and all other proprietary rights. Google reserves -all rights not expressly granted to you. - -3.3 You may not use the SDK for any purpose not expressly permitted by this License -Agreement. Except to the extent required by applicable third party licenses, you may not: -(a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse -engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or -(b) load any part of the SDK onto a mobile handset or any other hardware device except a -personal computer, combine any part of the SDK with other software, or distribute any -software or device incorporating a part of the SDK. - -3.4 You agree that you will not take any actions that may cause or result in the -fragmentation of Android, including but not limited to distributing, participating in the -creation of, or promoting in any way a software development kit derived from the SDK. - -3.5 Use, reproduction and distribution of components of the SDK licensed under an open -source software license are governed solely by the terms of that open source software -license and not this License Agreement. - -3.6 You agree that the form and nature of the SDK that Google provides may change without -prior notice to you and that future versions of the SDK may be incompatible with -applications developed on previous versions of the SDK. You agree that Google may stop -(permanently or temporarily) providing the SDK (or any features within the SDK) to you or -to users generally at Google's sole discretion, without prior notice to you. - -3.7 Nothing in this License Agreement gives you a right to use any of Google's trade -names, trademarks, service marks, logos, domain names, or other distinctive brand -features. - -3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices -(including copyright and trademark notices) that may be affixed to or contained within the -SDK. - - -4. Use of the SDK by You - -4.1 Google agrees that it obtains no right, title or interest from you (or your -licensors) under this License Agreement in or to any software applications that you -develop using the SDK, including any intellectual property rights that subsist in those -applications. - -4.2 You agree to use the SDK and write applications only for purposes that are permitted -by (a) this License Agreement and (b) any applicable law, regulation or generally accepted -practices or guidelines in the relevant jurisdictions (including any laws regarding the -export of data or software to and from the United States or other relevant countries). - -4.3 You agree that if you use the SDK to develop applications for general public users, -you will protect the privacy and legal rights of those users. If the users provide you -with user names, passwords, or other login information or personal information, you must -make the users aware that the information will be available to your application, and you -must provide legally adequate privacy notice and protection for those users. If your -application stores personal or sensitive information provided by users, it must do so -securely. If the user provides your application with Google Account information, your -application may only use that information to access the user's Google Account when, and -for the limited purposes for which, the user has given you permission to do so. - -4.4 You agree that you will not engage in any activity with the SDK, including the -development or distribution of an application, that interferes with, disrupts, damages, or -accesses in an unauthorized manner the servers, networks, or other properties or services -of any third party including, but not limited to, Google or any mobile communications -carrier. - -4.5 You agree that you are solely responsible for (and that Google has no responsibility -to you or to any third party for) any data, content, or resources that you create, -transmit or display through Android and/or applications for Android, and for the -consequences of your actions (including any loss or damage which Google may suffer) by -doing so. - -4.6 You agree that you are solely responsible for (and that Google has no responsibility -to you or to any third party for) any breach of your obligations under this License -Agreement, any applicable third party contract or Terms of Service, or any applicable law -or regulation, and for the consequences (including any loss or damage which Google or any -third party may suffer) of any such breach. - - -5. Your Developer Credentials - -5.1 You agree that you are responsible for maintaining the confidentiality of any -developer credentials that may be issued to you by Google or which you may choose yourself -and that you will be solely responsible for all applications that are developed under your -developer credentials. - - -6. Privacy and Information - -6.1 In order to continually innovate and improve the SDK, Google may collect certain -usage statistics from the software including but not limited to a unique identifier, -associated IP address, version number of the software, and information on which tools -and/or services in the SDK are being used and how they are being used. Before any of this -information is collected, the SDK will notify you and seek your consent. If you withhold -consent, the information will not be collected. - -6.2 The data collected is examined in the aggregate to improve the SDK and is maintained -in accordance with Google's Privacy Policy. - - -7. Third Party Applications - -7.1 If you use the SDK to run applications developed by a third party or that access -data, content or resources provided by a third party, you agree that Google is not -responsible for those applications, data, content, or resources. You understand that all -data, content or resources which you may access through such third party applications are -the sole responsibility of the person from which they originated and that Google is not -liable for any loss or damage that you may experience as a result of the use or access of -any of those third party applications, data, content, or resources. - -7.2 You should be aware the data, content, and resources presented to you through such a -third party application may be protected by intellectual property rights which are owned -by the providers (or by other persons or companies on their behalf). You may not modify, -rent, lease, loan, sell, distribute or create derivative works based on these data, -content, or resources (either in whole or in part) unless you have been specifically given -permission to do so by the relevant owners. - -7.3 You acknowledge that your use of such third party applications, data, content, or -resources may be subject to separate terms between you and the relevant third party. In -that case, this License Agreement does not affect your legal relationship with these third -parties. - - -8. Using Android APIs - -8.1 Google Data APIs - -8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may -be protected by intellectual property rights which are owned by Google or those parties -that provide the data (or by other persons or companies on their behalf). Your use of any -such API may be subject to additional Terms of Service. You may not modify, rent, lease, -loan, sell, distribute or create derivative works based on this data (either in whole or -in part) unless allowed by the relevant Terms of Service. - -8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree -that you shall retrieve data only with the user's explicit consent and only when, and for -the limited purposes for which, the user has given you permission to do so. - - -9. Terminating this License Agreement - -9.1 This License Agreement will continue to apply until terminated by either you or -Google as set out below. - -9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of -the SDK and any relevant developer credentials. - -9.3 Google may at any time, terminate this License Agreement with you if: - -(A) you have breached any provision of this License Agreement; or - -(B) Google is required to do so by law; or - -(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has -terminated its relationship with Google or ceased to offer certain parts of the SDK to -you; or - -(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in -the country in which you are resident or from which you use the service, or the provision -of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no -longer commercially viable. - -9.4 When this License Agreement comes to an end, all of the legal rights, obligations and -liabilities that you and Google have benefited from, been subject to (or which have -accrued over time whilst this License Agreement has been in force) or which are expressed -to continue indefinitely, shall be unaffected by this cessation, and the provisions of -paragraph 14.7 shall continue to apply to such rights, obligations and liabilities -indefinitely. - - -10. DISCLAIMER OF WARRANTIES - -10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND -THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM -GOOGLE. - -10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE -USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY -DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. - -10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, -WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND -CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - - -11. LIMITATION OF LIABILITY - -11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND -ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY -YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN -ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. - - -12. Indemnification - -12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold -harmless Google, its affiliates and their respective directors, officers, employees and -agents from and against any and all claims, actions, suits or proceedings, as well as any -and all losses, liabilities, damages, costs and expenses (including reasonable attorneys -fees) arising out of or accruing from (a) your use of the SDK, (b) any application you -develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, -patent or other intellectual property right of any person or defames any person or -violates their rights of publicity or privacy, and (c) any non-compliance by you with this -License Agreement. - - -13. Changes to the License Agreement - -13.1 Google may make changes to the License Agreement as it distributes new versions of -the SDK. When these changes are made, Google will make a new version of the License -Agreement available on the website where the SDK is made available. - - -14. General Legal Terms - -14.1 This License Agreement constitutes the whole legal agreement between you and Google -and governs your use of the SDK (excluding any services which Google may provide to you -under a separate written agreement), and completely replaces any prior agreements between -you and Google in relation to the SDK. - -14.2 You agree that if Google does not exercise or enforce any legal right or remedy -which is contained in this License Agreement (or which Google has the benefit of under any -applicable law), this will not be taken to be a formal waiver of Google's rights and that -those rights or remedies will still be available to Google. - -14.3 If any court of law, having the jurisdiction to decide on this matter, rules that -any provision of this License Agreement is invalid, then that provision will be removed -from this License Agreement without affecting the rest of this License Agreement. The -remaining provisions of this License Agreement will continue to be valid and enforceable. - -14.4 You acknowledge and agree that each member of the group of companies of which Google -is the parent shall be third party beneficiaries to this License Agreement and that such -other companies shall be entitled to directly enforce, and rely upon, any provision of -this License Agreement that confers a benefit on (or rights in favor of) them. Other than -this, no other person or company shall be third party beneficiaries to this License -Agreement. - -14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND -REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND -REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END -USERS AND END USE. - -14.6 The rights granted in this License Agreement may not be assigned or transferred by -either you or Google without the prior written approval of the other party. Neither you -nor Google shall be permitted to delegate their responsibilities or obligations under this -License Agreement without the prior written approval of the other party. - -14.7 This License Agreement, and your relationship with Google under this License -Agreement, shall be governed by the laws of the State of California without regard to its -conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction -of the courts located within the county of Santa Clara, California to resolve any legal -matter arising from this License Agreement. Notwithstanding this, you agree that Google -shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent -legal relief) in any jurisdiction. - -November 13, 2012 - -``` - - diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/component/Manifest.xml b/Components/xamandroidsupportv4-18-4.19.0.1/component/Manifest.xml deleted file mode 100644 index 3c4820a..0000000 --- a/Components/xamandroidsupportv4-18-4.19.0.1/component/Manifest.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Android Support Library v4 - Xamarin Inc. - http://xamarin.com - 4.19.0.1 - Provide backward-compatible versions of Android framework APIs. - - - Android Support Sample - Android Support Sample - - - \ No newline at end of file diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/component/icons/xamandroidsupportv4-18_128x128.png b/Components/xamandroidsupportv4-18-4.19.0.1/component/icons/xamandroidsupportv4-18_128x128.png deleted file mode 100644 index c3743f9..0000000 Binary files a/Components/xamandroidsupportv4-18-4.19.0.1/component/icons/xamandroidsupportv4-18_128x128.png and /dev/null differ diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/component/icons/xamandroidsupportv4-18_512x512.png b/Components/xamandroidsupportv4-18-4.19.0.1/component/icons/xamandroidsupportv4-18_512x512.png deleted file mode 100644 index 1b6ad2c..0000000 Binary files a/Components/xamandroidsupportv4-18-4.19.0.1/component/icons/xamandroidsupportv4-18_512x512.png and /dev/null differ diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/lib/android/19.0.1/support_r19.0.1.zip b/Components/xamandroidsupportv4-18-4.19.0.1/lib/android/19.0.1/support_r19.0.1.zip deleted file mode 100644 index 71ba8d3..0000000 Binary files a/Components/xamandroidsupportv4-18-4.19.0.1/lib/android/19.0.1/support_r19.0.1.zip and /dev/null differ diff --git a/Components/xamandroidsupportv4-18-4.19.0.1/lib/android/Xamarin.Android.Support.v4.dll b/Components/xamandroidsupportv4-18-4.19.0.1/lib/android/Xamarin.Android.Support.v4.dll deleted file mode 100644 index 20fcafe..0000000 Binary files a/Components/xamandroidsupportv4-18-4.19.0.1/lib/android/Xamarin.Android.Support.v4.dll and /dev/null differ diff --git a/PullToRefresharp.Android/PullToRefresharp.Android.csproj b/PullToRefresharp.Android/PullToRefresharp.Android.csproj index a992c38..6c71c91 100644 --- a/PullToRefresharp.Android/PullToRefresharp.Android.csproj +++ b/PullToRefresharp.Android/PullToRefresharp.Android.csproj @@ -14,6 +14,7 @@ Resources\Resource.designer.cs Resource PullToRefresharp + v2.3 1.0.2 @@ -40,7 +41,7 @@ - ..\Components\xamandroidsupportv4-18-4.19.0.1\lib\android\Xamarin.Android.Support.v4.dll + ..\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\Xamarin.Android.Support.v4.dll @@ -94,4 +95,7 @@ + + + \ No newline at end of file diff --git a/PullToRefresharp.Android/packages.config b/PullToRefresharp.Android/packages.config new file mode 100644 index 0000000..2381608 --- /dev/null +++ b/PullToRefresharp.Android/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/component.yaml b/component.yaml new file mode 100644 index 0000000..3f6e432 --- /dev/null +++ b/component.yaml @@ -0,0 +1,33 @@ +%YAML 1.2 +--- + +id: pulltorefresharp +name: PullToRefresharp +version: 1.0.2 +summary: Add pull-to-refresh to your Xamarin.Android apps. + +publisher: OxyPlot.org +publisher-url: http://github.com/bduncavage/PullToRefresharp +src-url: http://github.com/bduncavage/PullToRefresharp + +details: component/Details.md +license: component/License.md +getting-started: component/GettingStarted.md + +icons: + - component/icons/pulltorefresharp_128x128.png + - component/icons/pulltorefresharp_512x512.png + + +build: + - PullToRefresharp.Android.sln +libraries: + android: PullToRefresharp.Android/bin/Release/PullToRefresharp.dll +packages: + android: Xamarin.Android.Support.v4, Version=21.0.3.0 + + +samples: + - name: "Android Sample" + summary: "Demonstrates basic usage with ListView, GridView, and ScrollView" + path: samples/Sample.Android.sln diff --git a/component/Details.md b/component/Details.md new file mode 100644 index 0000000..5398b92 --- /dev/null +++ b/component/Details.md @@ -0,0 +1,46 @@ +# PullToRefresharp + +## Pull To Refresh for Android in `C#` + +Add pull-to-refresh functionality to your Android app quickly and easily. + +PullToRefresharp is the only C# library that provides pull-to-refresh functionality to ListView, GridView, and ScrollView on Android. It is simple to integrate with, customizable and extensible. + +### Simple integration: + +Update your layout: + +``` + + + + + +``` + +Hook into the `RefreshActivated` event + +```csharp +var gridView = FindViewById(Resource.Id.myGridView); +gridView.RefreshActivated += (o, e) { RefreshMyContent(); }; + +// when content refresh complete +gridView.OnRefreshCompleted(); + +``` + +### Features + +Out of the box PullToFrefresharp gives you a clean pull-to-refresh header UI and assets. You can change the colors or image assets via XML attributes, or include your own fully custom header. + +If you want to add pull-to-refresh to a view type other than GridView, ListView, or ScrollView, you can! Simply create a subclass of the view and implement the `IPullToRefreshWrappedView` interface (there's almost nothing to it, all you need to do is write a little bit of glue code to proxy most calls to `PullToRefresharp.Delegates.ViewDelegate`). + +### Fork it on GitHub! + +[PullToRefresharp on GitHub](http://github.com/bduncavage/PullToRefresharp) + +PullToRefresharp is free and open source software. If there's something you want to add, please do! The goal of PullToRefresharp is to provide a robust pull-to-refresh framework for all Xamarin.Android (and possiby Xamarin.iOS in the future) applications. + diff --git a/component/GettingStarted.md b/component/GettingStarted.md new file mode 100644 index 0000000..59b22fa --- /dev/null +++ b/component/GettingStarted.md @@ -0,0 +1,56 @@ +## PullToRefresharp + +Integrating PullToRefresharp into your existing application requires only a small amount of work. Modifying your layout to use the PullToRefresharp view and widget, then hooking into the RefreshActivated event, and finally calling OnRefreshComplete when you're done refreshing your content is all that you need to do. + +Let's get started! + +### Modifying your layout + +The first thing you need to replace is any ListView, GridView, or ScrollView you wish to enable pull-to-refresh on with the PullToRefresharp equivalent. + +``` + +``` + +Would become: + +``` + +``` + +The next, and last, thing you need to do to your layout is to wrap the view with a `ViewWrapper`. This is the bit that will inject the pull-to-refresh header and manage event handling (it's how PullToRefresharp can be used with more than just ListView). + +``` + + + + + +``` + +You are now done integrating PullToRefresharp into your layout! + +### Hooking up Events + +You'll want to know when a refresh has been activated. This is easy, just hook up a handler to your GridView, ListView, or ScrollView that has been PullToRefresharp-enabled. + +``` +var gridView = FindViewById(Resource.Id.myGridView); +gridView.RefreshActivated += (o, e) => { RefreshContent(); }; +``` + +As you can see, your GridView implements the `IPullToRefresharpView` interface. This interface exposes some useful methods and properties (such as enabling/disabling pull-to-refresh). Right now, we only care about the RefreshActivated event, this is raised when the user has pulled beyond the threshold and released. + +Now you will want to inform your IPullToRefreshView when you are done refreshing. This is done thusly: + +``` +gridView.OnRefreshCompleted(); +``` + +This causes the header to snapback up in an animated fashion. + +### Congratulations! + +You're done! There is no more you need to do to start using PullToRefresharp. Also look at the source for `IPullToRefreshView` and `attrs.xml` to discover more advanced options (http://github.com/bduncavage/PullToRefresharp). diff --git a/component/License.md b/component/License.md new file mode 100644 index 0000000..04f6a1c --- /dev/null +++ b/component/License.md @@ -0,0 +1,26 @@ +``` +This software is distributed under the MIT software license. + +The MIT License (MIT) + +Copyright (c) 2015 Brett Duncavage + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +``` \ No newline at end of file diff --git a/component/icons/pulltorefresharp_128x128.png b/component/icons/pulltorefresharp_128x128.png new file mode 100644 index 0000000..44bf6ce Binary files /dev/null and b/component/icons/pulltorefresharp_128x128.png differ diff --git a/component/icons/pulltorefresharp_512x512.png b/component/icons/pulltorefresharp_512x512.png new file mode 100644 index 0000000..97a7c75 Binary files /dev/null and b/component/icons/pulltorefresharp_512x512.png differ diff --git a/samples/Sample.Android/Sample.Android.csproj b/samples/Sample.Android/Sample.Android.csproj index f10dcce..b4d18b3 100644 --- a/samples/Sample.Android/Sample.Android.csproj +++ b/samples/Sample.Android/Sample.Android.csproj @@ -16,6 +16,7 @@ Resources\Resource.designer.cs PullToRefresharp.Android Properties\AndroidManifest.xml + v2.3 true @@ -27,6 +28,7 @@ false None True + full true @@ -35,6 +37,8 @@ 4 false false + armeabi;armeabi-v7a;x86 + full @@ -42,7 +46,7 @@ - ..\..\Components\xamandroidsupportv4-18-4.19.0.1\lib\android\Xamarin.Android.Support.v4.dll + ..\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\Xamarin.Android.Support.v4.dll @@ -57,6 +61,7 @@ + diff --git a/samples/Sample.Android/packages.config b/samples/Sample.Android/packages.config new file mode 100644 index 0000000..2381608 --- /dev/null +++ b/samples/Sample.Android/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file