Last active
March 31, 2016 18:41
-
-
Save suchithm/9dc598580525413c050463ccfea617eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//customized snackbar | |
void fnSnackBar( string strText,bool isLengthIndefinite) | |
{ | |
Snackbar objSnackBar = Snackbar.Make (linearLayoutMain, strText, isLengthIndefinite ? Snackbar.LengthIndefinite : Snackbar.LengthShort) | |
.SetAction (Resource.String.retry, (v) => { | |
//set action | |
}); | |
//set action button text color | |
objSnackBar.SetActionTextColor(Android.Graphics.Color.Aqua); | |
Android.Views.View objView = objSnackBar.View; | |
TextView txtAction = objView.FindViewById<TextView> (Resource.Id.snackbar_action); | |
txtAction.SetTextSize (Android.Util.ComplexUnitType.Dip, 18); | |
//set message text color | |
TextView txtMessage = objView.FindViewById<TextView> (Resource.Id.snackbar_text); | |
txtMessage.SetTextColor (Android.Graphics.Color.Red); | |
txtMessage.SetTextSize (Android.Util.ComplexUnitType.Dip, 18); | |
objSnackBar.Show (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment