locked
SnackBar LENGTH_INDEFINITE missing RRS feed

  • Question

  • User113964 posted

    Hi all in the The Android Design Support Library (22.2.0.0) I can't find the Length_indefinite parameter, plus the setDuration method seems not working for me. Any clue to make the Snackbar showing for a long period of time ?

    Thanks a lot for help

    Friday, October 9, 2015 9:31 AM

Answers

  • User113371 posted

    Tried this?

    Snackbar.Make(someLayout, "Your message", Snackbar.LengthIndefinite) .SetAction("Undo", (View) => {}) .Show();

    LengthIndefinite is available under class Snackbar in namespace Android.Support.Design.Widget

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, October 9, 2015 10:23 AM
  • User66025 posted

    Try this :

    using Android.Support.Design.Widget;
    
    Snackbar
        .Make (Layout, "Text Here", Snackbar.LengthIndefinite)
        .SetAction ("Cancel", (View) => { })
        .SetDuration(10000)
        .Show ();
    
    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, October 9, 2015 10:38 AM

All replies

  • User113371 posted

    Tried this?

    Snackbar.Make(someLayout, "Your message", Snackbar.LengthIndefinite) .SetAction("Undo", (View) => {}) .Show();

    LengthIndefinite is available under class Snackbar in namespace Android.Support.Design.Widget

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, October 9, 2015 10:23 AM
  • User66025 posted

    Try this :

    using Android.Support.Design.Widget;
    
    Snackbar
        .Make (Layout, "Text Here", Snackbar.LengthIndefinite)
        .SetAction ("Cancel", (View) => { })
        .SetDuration(10000)
        .Show ();
    
    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, October 9, 2015 10:38 AM
  • User113964 posted

    Great I only need to update the xamarin.android.support.design to version 23.0.0.1 (from 22.2.0.0) and now I can see the LengthIndefinite property. Thanks so much

    Friday, October 9, 2015 12:57 PM
  • User113964 posted

    Just to help some others: from the nuget components store you download the 22.2.0 version but in xamarin studio go to packages and Update the Xamarin.anfroid.support.design package.

    Friday, October 9, 2015 4:56 PM