GithubHelp home page GithubHelp logo

luonguct / xama.jtports.animatedcircleloadingview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joetomkinson/xama.jtports.animatedcircleloadingview

0.0 0.0 0.0 3.48 MB

C# Port of the Android Java library AnimatedCircleLoadingView .

License: Apache License 2.0

C# 100.00%

xama.jtports.animatedcircleloadingview's Introduction

Xamarin Animated Circle Loading View

platform API License: MIT NuGet

C# Port of the Android Java library AnimatedCircleLoadingView by jlmd

A determinate/indeterminate loading view animation. Based on android-watch-loading-animation by Nils Banner

Namespace: Xama.JTPorts.AnimatedCircleLoadingView

!gif

Outstanding Tasks:

  • Ensure Interfaces are implemented as per OOP standards.

  • Apply standard capitalizations across the library as per .Net guidelines.

  • Fix xml attributes

  • Replace android 'listeners' with events.

  • Replace colour implementations to match Xamarin.Android property requirements.

  • Ensure that non-optional parameters are all auto-populated if not supplied for the OO implementation.

  • Check for missing functionality in ported library and task out implementation.

  • Create NuGet package.

  • Fill basic usage information.

How to Install

NuGetIcon

Simply add the NuGet package directly to your Xamarin.Android solution, or use one of the following:

Package Manager:

Install-Package Xama.JTPorts.AnimatedCircleLoadingView -Version 1.0.1

.NET CLI:

dotnet add package Xama.JTPorts.AnimatedCircleLoadingView --version 1.0.1

Basic Usage:

Create control in your xml layout:

<Xama.JTPorts.AnimatedCircleLoadingView.AnimatedCircleLoadingView
  android:id="@+id/circle_loading_view_indeterminate"
  android:layout_width="250dp"
  android:layout_height="250dp"
  android:background="@color/white" />

Indeterminate Progress

Get control and assign the colors, this is important as currently the control can't infer these if not provided

AnimatedCircleLoadingView animatedCircleLoadingView = FindViewById<AnimatedCircleLoadingView>(Resource.Id.circle_loading_view_indeterminate);

animatedCircleLoadingView.MainColor = Resource.Color.colorPrimaryDark;
animatedCircleLoadingView.SecondaryColor = Resource.Color.risualOrange;
animatedCircleLoadingView.TextColor = Resource.Color.colorAccent;
animatedCircleLoadingView.CheckMarkTintColor = Color.White;

You can define a center body of text to sit inside of the loading view if needed

animatedCircleLoadingView.TitleText = "Loading";

Then simply start the animation

animatedCircleLoadingView.StartIndeterminate();

Determinate Progress

Get control and assign the colors, this is important as currently the control can't infer these if not provided

AnimatedCircleLoadingView animatedCircleLoadingView = FindViewById<AnimatedCircleLoadingView>(Resource.Id.circle_loading_view_indeterminate);

animatedCircleLoadingView.MainColor = Resource.Color.colorPrimaryDark;
animatedCircleLoadingView.SecondaryColor = Resource.Color.risualOrange;
animatedCircleLoadingView.TextColor = Resource.Color.colorAccent;
animatedCircleLoadingView.CheckMarkTintColor = Color.White;

Start the animation

animatedCircleLoadingView.StartDeterminate();

Then simply set the percentage using this method (takes an integer value)

animatedCircleLoadingView.SetPercentage(50);

Currently when the control hits 100 percent it automatically adds the FinishedOK view, but you can also fire this manually.

animatedCircleLoadingView.StopOk();

or the failed view

animatedCircleLoadingView.StopFailure();

Support ๐Ÿ’Ž

If you want to support the work that I do and you find any of these libraries useful? Consider supporting it by joining stargazers for this repository. ๐Ÿ”ญ ๐ŸŒ 


or alternatively if you want to you can also buy me a coffee.

Buy Me A Coffee

You know, only if you want to.

xama.jtports.animatedcircleloadingview's People

Contributors

joetomkinson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.