Giter Site home page Giter Site logo

plugin.xsnack's Introduction

Snackbar Plugin for Xamarin

Simple cross platform plugin to display short notification messages to the user.

Screenshots

Soon...

Documentation

Get started by reading through the Snackbar Plugin documentation.

NuGet

Build:

  • Build status

Platform Support

Platform Version
Xamarin.iOS iOS 8+
Xamarin.Android API 21+
Windows 10 UWP Unsupported

iOS Implementation

Plugin.XSnack uses TTGSnackbar on iOS. For issues or more info, checkout the TTGSnackbar repo

Keep in touch

Contribution

Thanks you for your interest in contributing to Snackbar plugin! In this section we'll outline what you need to know about contributing and how to get started.

Bug Fixes

Please browse open issues, if you're looking to fix something, it's possible that someone already reported it. Additionally you select any up-for-grabs items

Pull requests

Please fill out the pull request template when you send one.

License

The MIT License (MIT) see License file

plugin.xsnack's People

Contributors

ice-j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

plugin.xsnack's Issues

[feature request] multiple actions

This is perhaps non-standard but it would be nice to support 2 action buttons instead of just one.
There are several reasons why a developer might want 2 action buttons (even though this is probably not common it would be nice if it were at least supported)

on the ShowMessage method, The ICommand could be modified to accept a parameter to indicate which action was tapped.

[feature request] stackable snackbar notifiations

This is not standard behavior for snackbars, The default behavior is that only 1 can be shown at any given time.
but it would be nice to support stacking for cases where developers would like to show multiple snackbars at the bottom of the application in a vertical stack.

[feature request] manual snack bar dismissal

We have a use case where a snackbar is displayed based on network connection change events.
The snackbar displays "Please Enable WiFi" and the action navigates the user to their OS Wifi settings.

It would be nice to have a method to manually dismiss the snackbar if the user enables wifi without using the snackbar action button.

NullPointerException thrown on showMessage [Android]

When I try to show a XSnackbar I get a NullPointerException. I'm running on Android, can't test on iOS because I'm on Windows.

Details:

{System.NullReferenceException: Object reference not set to an instance of an object.
at Plugin.XSnack.XSnackImplementation.DisplayMessage (System.String message, System.Int32 duration, System.String actionText, System.Windows.Input.ICommand actionCommand) [0x00021] in <7951a697453f4916b4eea63c683cfeba>:0
at Plugin.XSnack.XSnackImplementation.ShowMessage (System.String message, System.Int32 duration, System.String actionText, System.Windows.Input.ICommand actionCommand) [0x00000] in <7951a697453f4916b4eea63c683cfeba>:0
at App1.MainPage.ShowMessage (System.String text) [0x00019] in \MainPage.xaml.cs:48 }

Code:

if (Plugin.XSnack.CrossXSnack.IsSupported && Plugin.XSnack.CrossXSnack.Current != null)
{
    try
    {
        Plugin.XSnack.CrossXSnack.Current.ShowMessage(text);
    }
    catch (Exception e) {
        Console.WriteLine(e);
    }
}

[feature request] timeout callback / command

The action command is only invoked when the user taps the action button.
It would be nice to also have a timeout command or event to notify the consumer logic if the snackbar notification timed out instead of being manually dismissed by the user tapping the action button

Add customization options

We need to implement

  • Text color
  • Action text color
  • Action background color styling.
  • Snackbar background color

UWP implementation

We need something similar to the Snackbar implementation for UWP.
I am not UWP developer and I've searched a bit to find the Flyout control, but I'm not sure that's the right way to go.

Any suggestions on this?

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.