Xamarin-FiveStarsRate
4.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Xamarin-FiveStarsRate --version 4.0.0
NuGet\Install-Package Xamarin-FiveStarsRate -Version 4.0.0
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-FiveStarsRate" Version="4.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin-FiveStarsRate --version 4.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Xamarin-FiveStarsRate, 4.0.0"
#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-FiveStarsRate as a Cake Addin #addin nuget:?package=Xamarin-FiveStarsRate&version=4.0.0 // Install Xamarin-FiveStarsRate as a Cake Tool #tool nuget:?package=Xamarin-FiveStarsRate&version=4.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
How to use
To use this library just add this snippet in the OnCreate
of your activity.
The ShowAfter(int numbersOfAccess)
method tells the library after how many access the dialog has to be shown.
Example:
FiveStarsDialog fiveStarsDialog = new FiveStarsDialog(this, "fede_example@noreply.com");
fiveStarsDialog.SetRateText("Your custom text")
.SetTitle("Your custom title")
.SetForceMode(false)
.SetUpperBound(2)
.SetNegativeReviewListener(new NegativeReview(this))
.SetReviewListener(new PositiveReview(this))
.ShowAfter(0);
public class NegativeReview : Java.Lang.Object, INegativeReviewListener
{
readonly MainActivity MainActivity;
public NegativeReview(MainActivity mainActivity)
{
MainActivity = mainActivity;
}
public void OnNegativeReview(int p0)
{
Toast.MakeText(MainActivity, $"Negative. Stars {p0}", ToastLength.Short);
}
}
public class PositiveReview : Java.Lang.Object, IReviewListener
{
readonly MainActivity MainActivity;
public PositiveReview(MainActivity mainActivity)
{
MainActivity = mainActivity;
}
public void OnReview(int p0)
{
Toast.MakeText(MainActivity, $"Positive. Stars {p0}", ToastLength.Short);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-android was computed. net7.0-android was computed. net8.0-android was computed. |
MonoAndroid | monoandroid is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Xamarin.AndroidX.AppCompat (>= 1.1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.