Xama.JTPorts.ShineButton 1.0.1

dotnet add package Xama.JTPorts.ShineButton --version 1.0.1
NuGet\Install-Package Xama.JTPorts.ShineButton -Version 1.0.1
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="Xama.JTPorts.ShineButton" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xama.JTPorts.ShineButton --version 1.0.1
#r "nuget: Xama.JTPorts.ShineButton, 1.0.1"
#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 Xama.JTPorts.ShineButton as a Cake Addin
#addin nuget:?package=Xama.JTPorts.ShineButton&version=1.0.1

// Install Xama.JTPorts.ShineButton as a Cake Tool
#tool nuget:?package=Xama.JTPorts.ShineButton&version=1.0.1

Xama.JTPorts.ShineButton

platform API License: MIT Build: Passing NuGet

Xamarin.Android Native UI lib button effects like "shining".

Xamarin.Android Native "Shine Button" control. This is a UI lib for Xamarin Android. Creates 'shining' effects. Initial port from ShineButton by Chad Song

This is a ported build, converted from Java to C# for use with the Xamarin MonoFramework. There are only a couple of new additions from the original library currently.

Installation

NuGetIcon

This can be installed to any Xamarin Android project by adding the NuGet package to your solution. This library has been migrated to AndroidX Support libraries so it may ask you to install those dependencies if you have not migrated across to AndroidX yet.

Package Manager:

Install-Package Xama.JTPorts.ShineButton -Version 1.0.1

.NET CLI:

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

Basic usage

The Icon shape is made from png mask and the ported library preferred RAW formats, however you can use normal images, just bear in mind that as it masks an image you'll lose details, so use cut-out images instead, similar to the animated gif above.

Create programatically and then simply add to your view:

         ShineButtonControl shineButtonControl = new ShineButtonControl(this);
         shineButtonControl.ButtonColour = Color.Gray;
         shineButtonControl.ButtonFillColour = Color.Red;
         shineButtonControl.ShapeResource = Resource.Raw.heart;
         shineButtonControl.AllowRandomColour = true;

         var layoutParams = new LinearLayout.LayoutParams(100, 100);
         shineButtonControl.LayoutParameters = layoutParams;

Or simply define in AXML as such:

<ShineButton.Classes.ShineButtonControl
         android:layout_width="50dp"
         android:layout_height="50dp"
         android:layout_marginBottom="50dp"
         android:layout_centerInParent="true"
         android:id="@+id/po_like"
         app:btn_color="@android:color/darker_gray"
         app:btn_fill_color="#0f4cad"
         app:big_shine_color="#8094e5"
         app:click_animation_duration="200"
         app:shine_animation_duration="1500"
         app:shine_turn_angle="10"
         app:small_shine_offset_angle="20"
         app:shine_distance_multiple="1.5"
         app:small_shine_color="#CC9999"
         app:shine_count="8"
         app:shine_size="30dp"
         app:siShape="@raw/like" />

Available Attributes

<attr name="btn_color" format="color" />
<attr name="btn_fill_color" format="color" />
<attr name="shine_count" format="integer" />
<attr name="shine_turn_angle" format="float" />
<attr name="small_shine_offset_angle" format="float" />
<attr name="enable_flashing" format="boolean" />
<attr name="allow_random_color" format="boolean" />
<attr name="small_shine_color" format="color" />
<attr name="big_shine_color" format="color" />
<attr name="shine_animation_duration" format="integer" />
<attr name="click_animation_duration" format="integer" />
<attr name="shine_distance_multiple" format="float" />
<attr name="shine_size" format="dimension" />

Dependencies

Xama.JTPorts.EasingInterpolator

Product Compatible and additional computed target framework versions.
MonoAndroid monoandroid90 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.1 506 4/15/2020
1.0.0 965 5/25/2018

1.0.1 - Migratred to Android X support libraries.