Xamarin.Facebook.Shimmer 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Xamarin.Facebook.Shimmer --version 1.0.3                
NuGet\Install-Package Xamarin.Facebook.Shimmer -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xamarin.Facebook.Shimmer" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.Facebook.Shimmer --version 1.0.3                
#r "nuget: Xamarin.Facebook.Shimmer, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Xamarin.Facebook.Shimmer as a Cake Addin
#addin nuget:?package=Xamarin.Facebook.Shimmer&version=1.0.3

// Install Xamarin.Facebook.Shimmer as a Cake Tool
#tool nuget:?package=Xamarin.Facebook.Shimmer&version=1.0.3                

Xamarin.Facebook.Shimmer

NuGet Badge

This is a set of Xamarin bindings of Facebook Shimmer for iOS and Android

Shimmer is an easy way to add a shimmering effect to any view in your app. It's useful as an unobtrusive loading indicator.

Shimmer

Table of Contents

Installation

The latest stable release of the Facebook.Shimmer is on available on NuGet.

Example

A demo app that integrates Facebook.Shimmer is included in the repo. You may clone the GitHub repository into a new Visual Studio project folder and run the Examples project.

Facebook Shimmer Android

Usage Overview

The following snippet shows how you can use ShimmerFrameLayout

<com.facebook.shimmer.ShimmerFrameLayout
     android:id="@+id/shimmer_view_container"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content">

     ...(your complex view here)...

</com.facebook.shimmer.ShimmerFrameLayout>

And thats it! If you specify auto-start to be false, then you can start the animation in code:

ShimmerFrameLayout container = FindViewById<ShimmerFrameLayout>(R.id.shimmer_view_container);
container.StartShimmer(); // If auto-start is set to false

Facebook Shimmer iOS

Usage Overview

To use Shimmer, create a FBShimmeringView or FBShimmeringLayer and add your content. To start shimmering, set the Shimmering property to true.

An example of making a label shimmer:

FBShimmeringView shimmeringView = new FBShimmeringView(this.View.Bounds);
this.View.AddSubview(shimmeringView);

UILabel loadingLabel = new UILabel(shimmeringView.Bounds);
loadingLabel.TextAlignment = UITextAlignment.Center;
loadingLabel.Text = @"Shimmer";
shimmeringView.ContentView = loadingLabel;

// Start shimmering.
shimmeringView.Shimmering = true;

There's also an example project. In the example, you can swipe horizontally and vertically to try various shimmering parameters, or tap to start or stop shimmering.

Product Compatible and additional computed target framework versions.
.NET net8.0-android34.0 is compatible.  net8.0-ios17.2 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 3,242 5/27/2024
1.0.3 128 5/23/2024
1.0.2 20,891 8/4/2022
1.0.1 15,977 10/13/2019
1.0.0 209,704 4/4/2019

Library version:
[iOS] Xamarin.Facebook.Shimmer 1.0.2
[Android] Xamarin.Facebook.Shimmer 0.5.0