https://github.com/erizet/workerfragment4monodroid
Monodroid library to handle state between orientation changes. The library aims to simplify the use of the worker fragment pattern.
https://github.com/erizet/workerfragment4monodroid
Last synced: about 1 month ago
JSON representation
Monodroid library to handle state between orientation changes. The library aims to simplify the use of the worker fragment pattern.
- Host: GitHub
- URL: https://github.com/erizet/workerfragment4monodroid
- Owner: erizet
- Created: 2014-02-04T09:20:26.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-25T06:46:34.000Z (almost 12 years ago)
- Last Synced: 2025-01-05T19:27:34.451Z (12 months ago)
- Language: C#
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#WorkerFragment4MonoDroid#
##Description##
WorkerFragment4MonoDroid is a Monodroid library to handle state saving between orientation changes. The library aims to simplify the use of the worker fragment pattern.
##How to use##
Let your Activity inherit from WorkerActivity, and specify the WorkerType you like to use, like this:
public class MainActivity : WorkerActivity
Then you can access the worker from the Worker property.
protected override void OnResume ()
{
base.OnStart ();
Worker.ProgressChanged += _myFragment.HandleProgressChanged;
Worker.RunDemo ();
}
The worker instance is saved between orientation changes. See the sample project.
##License##
Copyright 2013 Erik Zetterqvist
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.