public FloatingActionButton() { SizeRequest = 40; AllowTap = true; GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(() => { if (TapAction != null) { TapAction.Dispatch(); return; } if (IsOpened) { IsOpened = false; CloseAction.Dispatch(); } else { IsOpened = true; OpenAction.Dispatch(); } }, () => AllowTap) }); }
public static WindowInfo AddWindowInfo(string path, ShowMode showMode, OpenAction openAct, BackgroundMode bgMode) { var info = new WindowInfo(path, showMode, openAct, bgMode); mWindowInfoMap.Add(info.name, info); return(info); }
public void TestHasClosureReferenceClassMethodLambda() { var target = new TestClass(); Action <int> action = i => target.SetValue(i + 1); Assert.That(OpenAction.HasClosureReference(action), Is.True); }
public virtual void ApplyActionsStyle() { NotificationActions?.RemoveAllViews(); if (OpenNotification.HasActions()) { var actions = OpenNotification.RetrieveActions(); for (int i = 0; i <= actions.Count - 1; i++) { var action = actions[i]; OpenAction openAction = new OpenAction(action); Button actionButton = new Button(Application.Context); float weight = 1f / actions.Count; actionButton.LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight); SetActionTextColor(actionButton); SetActionTag(actionButton, openAction); actionButton.Click += ActionButton_Click; SetActionButtonGravity(actionButton); SetActionButtonTextMaxLines(actionButton); SetActionButtonTextTypeface(actionButton); SetActionButtonBackground(actionButton); SetActionText(actionButton, openAction.Title()); SetActionTextLowercase(actionButton); SetActionIcon(actionButton, openAction); AddActionToActionsView(actionButton, i); } } }
public void TestHasClosureReferenceClassMethod() { var target = new TestClass(); Action <int> action = target.SetValue; Assert.That(OpenAction.HasClosureReference(action), Is.False); }
public WeakActionImpl(Action action, Action <Action> unregister) { m_target_ref = new WeakReference(action.Target); m_open_action = (OpenAction)Delegate.CreateDelegate(typeof(OpenAction), null, action.Method); Handler = Invoke; m_unregister = unregister; }
public bool Equals(DestinyItemSackBlockDefinition input) { if (input == null) { return(false); } return (( DetailAction == input.DetailAction || (DetailAction != null && DetailAction.Equals(input.DetailAction)) ) && ( OpenAction == input.OpenAction || (OpenAction != null && OpenAction.Equals(input.OpenAction)) ) && ( SelectItemCount == input.SelectItemCount || (SelectItemCount.Equals(input.SelectItemCount)) ) && ( VendorSackType == input.VendorSackType || (VendorSackType != null && VendorSackType.Equals(input.VendorSackType)) ) && ( OpenOnAcquire == input.OpenOnAcquire || (OpenOnAcquire != null && OpenOnAcquire.Equals(input.OpenOnAcquire)) )); }
public void TestCreateOpenActionStaticMethod() { Assert.That(() => OpenAction.CreateOpenAction <int>(TestClass.SetStaticValue), Throws.ArgumentException); Action <int, int> method = TestClass.SetStaticValues; Assert.That(() => OpenAction.CreateOpenAction <int, int>(method.Method), Throws.ArgumentException); }
public void TestHasClosureReferenceLocalVariableLambda() { int value = 0; Action <int> action = i => value = i; Assert.That(OpenAction.HasClosureReference(action), Is.True); Assert.That(value, Is.EqualTo(0)); // prevent unused variable }
public WindowInfo(string path, ShowMode showMode, OpenAction openAct, BackgroundMode bgMode) { this.prefabPath = path; this.name = path.Substring(path.LastIndexOf('/') + 1); this.showMode = showMode; this.openAction = openAct; this.backgroundMode = bgMode; }
public void TestOpenActionWrongTargetType() { var target = new TestClass(); Action <object, int> openAction = OpenAction.CreateOpenAction <int>(target.SetValue); Assert.That(openAction, Is.Not.Null, "failed to create openAction"); Assert.That(() => openAction(this, 3), Throws.InstanceOf <InvalidCastException>()); }
private void ItemClicked(object sender, NotificationItemClickedEventArgs e) { position = e.Position; using (OpenNotification openNotification = new OpenNotification(e.Position)) { ThreadPool.QueueUserWorkItem(method => { var notificationBigPicture = new BitmapDrawable(Resources, openNotification.GetBigPicture()); WallpaperPublisher.ChangeWallpaper(new WallpaperChangedEventArgs { Wallpaper = notificationBigPicture, OpacityLevel = 125, SecondsOfAttention = 5 }); }); titulo.Text = openNotification.GetTitle(); texto.Text = openNotification.GetText(); appName.Text = openNotification.GetAppName(); when.Text = openNotification.GetWhen(); notificationActions.RemoveAllViews(); if (openNotification.NotificationHasActionButtons() == true) { var actions = openNotification.RetrieveActions(); foreach (var a in actions) { OpenAction openAction = new OpenAction(a); float weight = (float)1 / actions.Count; Button anActionButton = new Button(Application.Context) { LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight), Text = openAction.GetTitle() }; anActionButton.TransformationMethod = null; anActionButton.SetTypeface(Typeface.Create("sans-serif-condensed", TypefaceStyle.Normal), TypefaceStyle.Normal); anActionButton.SetMaxLines(1); anActionButton.SetTextColor(Color.White); anActionButton.Click += (o, eventargs) => { openAction.ClickAction(); }; anActionButton.Gravity = GravityFlags.CenterVertical; TypedValue outValue = new TypedValue(); Application.Context.Theme.ResolveAttribute(Android.Resource.Attribute.SelectableItemBackgroundBorderless, outValue, true); anActionButton.SetBackgroundResource(outValue.ResourceId); anActionButton.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(), null, null, null); notificationActions.AddView(anActionButton); } ; } } if (notification.Visibility != ViewStates.Visible) { notification.Visibility = ViewStates.Visible; StartTimeout(); } NotificationClicked?.Invoke(null, EventArgs.Empty); }
public void TestOpenActionTargetAsObject() { var target = new TestClass(); Action <object, int> openAction = OpenAction.CreateOpenAction <int>(target.SetValue); Assert.That(openAction, Is.Not.Null, "failed to create openAction"); openAction(target, 3); Assert.That(target.Value, Is.EqualTo(3)); }
private void NotificationAdapterViewHolder_ItemClicked(object sender, Notificaciones.NotificationEventArgs.NotificationItemClickedEventArgs e) { position = e.Position; using (OpenNotification notification = new OpenNotification(e.Position)) { position = e.Position; using (OpenNotification openNotification = new OpenNotification(e.Position)) { floatingNotificationAppName.Text = notification.GetAppName(); floatingNotificationWhen.Text = notification.GetWhen(); floatingNotificationTitle.Text = notification.GetTitle(); floatingNotificationText.Text = notification.GetText(); floatingNotificationActionsContainer.RemoveAllViews(); if (openNotification.NotificationHasActionButtons() == true) { var actions = openNotification.RetrieveActions(); foreach (var a in actions) { OpenAction openAction = new OpenAction(a); float weight = (float)1 / actions.Count; Button anActionButton = new Button(Application.Context) { LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight), Text = openAction.GetTitle(), }; anActionButton.SetTypeface(Typeface.Create("sans-serif-condensed", TypefaceStyle.Normal), TypefaceStyle.Normal); anActionButton.SetMaxLines(1); anActionButton.SetTextColor(Color.Black); anActionButton.Click += (o, eventargs) => { openAction.ClickAction(); }; anActionButton.Gravity = GravityFlags.CenterVertical; TypedValue outValue = new TypedValue(); Application.Context.Theme.ResolveAttribute(Android.Resource.Attribute.SelectableItemBackgroundBorderless, outValue, true); anActionButton.SetBackgroundResource(outValue.ResourceId); anActionButton.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(), null, null, null); floatingNotificationActionsContainer.AddView(anActionButton); } ; } } if (floatingNotificationView.Visibility != ViewStates.Visible) { floatingNotificationView.Visibility = ViewStates.Visible; } else { floatingNotificationView.Visibility = ViewStates.Invisible; } }; }
public void TestCreateOpenActionTwoParameters() { var target = new TestClass(); Action <int, int> method = target.SetValues; Action <object, int, int> openAction = OpenAction.CreateOpenAction <int, int>(method.Method); Assert.That(openAction, Is.Not.Null, "failed to create openAction"); openAction(target, 3, 4); Assert.That(target.Value, Is.EqualTo(7)); }
public void CheckPassword() { string correctPassword = "******"; string inputPassword = ""; foreach (Text text in texts) { inputPassword += text.text; } if (correctPassword == inputPassword) { OpenAction.Invoke(); } }
public JsonResult OnPostLoadDirectory([FromBody] OpenAction openAction) { using (SqlConnection connection = new SqlConnection(_connectionString)) { connection.Open(); DataTable dt = new DataTable(); using (SqlCommand command = new SqlCommand("[dbo].[GetDirectoryItems]", connection)) { command.CommandType = CommandType.StoredProcedure; command.CommandTimeout = 300; command.Parameters.Add("@IdDirectory", SqlDbType.Int); command.Parameters["@IdDirectory"].Value = openAction.IdDirectory ?? Convert.DBNull; command.Parameters.Add("@IsSortByName", SqlDbType.Bit); command.Parameters["@IsSortByName"].Value = openAction.IsSortByName; using (SqlDataReader dataReader = command.ExecuteReader()) { dt.Load(dataReader); } } connection.Close(); OpenResult result = new OpenResult(); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i].Field <int?>("Id_Directory").HasValue) { Directory dir = new Directory(dt.Rows[i].Field <int>("Id_Directory")); dir.Name = dt.Rows[i].Field <string>("Name"); dir.HasSubItems = dt.Rows[i].Field <bool>("HasSubItems"); result.Directories.Add(dir); } else { File file = new File(dt.Rows[i].Field <int>("Id_File")); file.Name = dt.Rows[i].Field <string>("Name"); file.Size = dt.Rows[i].Field <long>("Size"); result.Files.Add(file); } } return(new JsonResult(JsonConvert.SerializeObject(result))); } }
void Main() { MethodInfo sayHelloMethod = typeof(Person).GetMethod("SayHello"); OpenAction <Person, string> action = (OpenAction <Person, string>) Delegate.CreateDelegate( typeof(OpenAction <Person, string>), null, sayHelloMethod); Person joe = new Person { Name = "Joe" }; action(joe, "Jack"); // Prints "Hello Jack, my name is Joe" }
public void ApplyActionsStyle(OpenNotification notification) { notificationActions?.RemoveAllViews(); if (notification.HasActions()) { var actions = notification.RetrieveActions(); foreach (Notification.Action action in actions) { OpenAction openAction = new OpenAction(action); Button actionButton = new Button(Application.Context); float weight = 1f / actions.Count; actionButton.LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight); actionButton.SetTextColor(Color.White); //Should change in MediaStyle (?) actionButton.SetTag(DefaultActionIdentificator, openAction); actionButton.Click += AnActionButton_Click; actionButton.Gravity = actionButtonsGravity; actionButton.SetMaxLines(actiontextMaxLines); TypedValue outValue = new TypedValue(); Application.Context.Theme.ResolveAttribute(Android.Resource.Attribute.SelectableItemBackground, outValue, true); actionButton.SetBackgroundResource(outValue.ResourceId); actionButton.SetTypeface(Typeface.Create(actionTextsTypeface, TypefaceStyle.Normal), TypefaceStyle.Normal); //notificationActions.SetGravity(actionButtonsContainerGravity); if (notification.Style() != MediaStyle) { actionButton.Text = openAction.Title(); } if (actionTextsAreinCapitalLetters == false) { actionButton.TransformationMethod = null; //Disables all caps text. } Handler looper = new Handler(Looper.MainLooper); looper.Post(() => { if (shouldShowIcons || notification.Style() == MediaStyle) //The MediaStyle allows icons to be shown. { actionButton.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(), null, null, null); } notificationActions.AddView(actionButton); }); } } }
private void SendInlineResponse_Click(object sender, EventArgs e) { ImageButton actionButton = sender as ImageButton; OpenAction openAction = actionButton.GetTag(DefaultActionIdentificator) as OpenAction; openAction.SendInlineResponse(InlineResponse.Text); InlineResponse.Text = string.Empty; NotificationActions.Visibility = ViewStates.Visible; InlineResponseNotificationContainer.Visibility = ViewStates.Invisible; // Check if no view has focus: View view = NotificationFragment?.Activity?.CurrentFocus; if (view != null) { InputMethodManager imm = (InputMethodManager)NotificationFragment.Activity.GetSystemService(Context.InputMethodService); imm.HideSoftInputFromInputMethod(view.WindowToken, 0); } SendInlineResponseAvailabityChanged?.Invoke(null, false); }
private void AnActionButton_Click(object sender, System.EventArgs e) { Button actionButton = sender as Button; OpenAction openAction = actionButton.GetTag(DefaultActionIdentificator) as OpenAction; if (openAction.ActionRepresentDirectReply()) { notificationActions.Visibility = ViewStates.Invisible; inlineNotificationContainer.Visibility = ViewStates.Visible; inlineresponse.Hint = openAction.GetPlaceholderTextForInlineResponse(); sendinlineresponse.SetTag(DefaultActionIdentificator, openAction); sendinlineresponse.Click += Sendinlineresponse_Click; SendInlineResponseAvailabityChanged?.Invoke(null, true); //Is currently showing. } else { openAction.ClickAction(); SendInlineResponseAvailabityChanged?.Invoke(null, false); //Here I assume the send inline textbox is not present, because the action simply does not represent a direct reply. } }
public void Open <T>(T uiID, AbstractPanel masterPanel, params object[] args) where T : IConvertible { if (m_Stack == null) { m_Stack = new List <OpenAction>(); } int id = uiID.ToInt32(null); OpenAction action = new OpenAction(id, masterPanel); action.SetParam(args); for (int i = 0; i < m_Stack.Count; ++i) { m_Stack[i].Hide(); } m_Stack.Add(action); action.Show(); }
protected virtual void ActionButton_Click(object sender, EventArgs e) { Button actionButton = sender as Button; OpenAction openAction = actionButton.GetTag(DefaultActionIdentificator) as OpenAction; if (openAction.ActionRepresentDirectReply()) { if (new ConfigurationManager(AppPreferences.Default).RetrieveAValue(ConfigurationParameters.EnableQuickReply)) { NotificationActions.Visibility = ViewStates.Invisible; InlineResponseNotificationContainer.Visibility = ViewStates.Visible; InlineResponse.Hint = openAction.GetPlaceholderTextForInlineResponse(); SendInlineResponse.SetTag(DefaultActionIdentificator, openAction); SendInlineResponse.Click += SendInlineResponse_Click; SendInlineResponseAvailabityChanged?.Invoke(null, true); } } else { openAction.ClickAction(); } }
public void DataSet(Command order) { ActionShell AS; foreach (DataShell Shell in order.Data) { switch (Shell.key) { case "TextBox.Open": case "TextBox.Close": AS = new OpenAction(TextBoxPivot); ActionPlan.Add(AS); break; case "FaceBox.Open": case "FaceBox.Close": AS = new OpenAction(FaceBoxPivot); ActionPlan.Add(AS); break; case "ImageBox.Open": case "ImageBox.Close": AS = new OpenAction(ImageBoxPivot); ActionPlan.Add(AS); break; case "SelectBox.Open": case "SelectBox.Close": AS = new OpenAction(SelectBoxPivot); ActionPlan.Add(AS); break; case "TextBox.AddText": AS = new TalkAction(Shell.Data, this); ActionPlan.Add(AS); break; case "FaceBox.SetImage": AS = new SetImage(NPCFace, Shell.Data); ActionPlan.Add(AS); break; case "ImageBox.SetImage": AS = new SetImage(ImageBox, Shell.Data); ActionPlan.Add(AS); break; case "SelectBox.AddChoice": break; case "SelectBox.AddText": break; case "SelectBox.SetImage": AS = new SetImage(PlayerFace, Shell.Data); ActionPlan.Add(AS); break; default: Debug.Log("Lost order : " + Shell.key); break; } } StartCoroutine(DataAction()); }
private void NotificationAdapterViewHolder_ItemClicked(object sender, NotificationItemClickedEventArgs e) { openNotification = new OpenNotification(e.StatusBarNotification); if (configurationManager.RetrieveAValue(ConfigurationParameters.TestEnabled)) { Toast.MakeText(floatingNotificationView.Context, "Progress Indeterminate?: " + openNotification.IsProgressIndeterminate().ToString() + "\n" + "Current Progress: " + openNotification.GetProgress().ToString() + "\n" + "Max Progress: " + openNotification.GetProgressMax().ToString() + "\n" + openNotification.GetGroupInfo() , ToastLength.Short).Show(); } //Only do this process if the notification that I want to show is different than the one that //the Floating Notification Widget has. //If it's the same then simply show it. if ((string)floatingNotificationView.GetTag(Resource.String.defaulttag) != openNotification.GetCustomId()) { floatingNotificationAppName.Text = openNotification.AppName(); floatingNotificationWhen.Text = openNotification.When(); floatingNotificationTitle.Text = openNotification.Title(); floatingNotificationText.Text = openNotification.Text(); floatingNotificationActionsContainer.RemoveAllViews(); if (openNotification.HasActions() == true) { var actions = openNotification.RetrieveActions(); foreach (var a in actions) { OpenAction openAction = new OpenAction(a); float weight = (float)1 / actions.Count; Button anActionButton = new Button(Application.Context) { LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight), Text = openAction.Title(), }; anActionButton.SetTypeface(Typeface.Create("sans-serif-condensed", TypefaceStyle.Normal), TypefaceStyle.Normal); anActionButton.SetMaxLines(1); anActionButton.SetTextColor(Color.Black); anActionButton.Click += (o, eventargs) => { openAction.ClickAction(); }; anActionButton.Gravity = GravityFlags.CenterVertical; TypedValue outValue = new TypedValue(); Application.Context.Theme.ResolveAttribute(Android.Resource.Attribute.SelectableItemBackgroundBorderless, outValue, true); anActionButton.SetBackgroundResource(outValue.ResourceId); //anActionButton.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(), null, null, null); floatingNotificationActionsContainer.AddView(anActionButton); } ; } } else { floatingNotificationAppName.Text = openNotification.AppName(); floatingNotificationWhen.Text = openNotification.When(); floatingNotificationTitle.Text = openNotification.Title(); floatingNotificationText.Text = openNotification.Text(); floatingNotificationActionsContainer.RemoveAllViews(); if (openNotification.HasActions() == true) { var actions = openNotification.RetrieveActions(); foreach (var a in actions) { OpenAction openAction = new OpenAction(a); float weight = (float)1 / actions.Count; Button anActionButton = new Button(Application.Context) { LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight), Text = openAction.Title(), }; anActionButton.SetTypeface(Typeface.Create("sans-serif-condensed", TypefaceStyle.Normal), TypefaceStyle.Normal); anActionButton.SetMaxLines(1); anActionButton.SetTextColor(Color.Black); anActionButton.Click += (o, eventargs) => { openAction.ClickAction(); }; anActionButton.Gravity = GravityFlags.CenterVertical; TypedValue outValue = new TypedValue(); Application.Context.Theme.ResolveAttribute(Android.Resource.Attribute.SelectableItemBackgroundBorderless, outValue, true); anActionButton.SetBackgroundResource(outValue.ResourceId); //anActionButton.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(), null, null, null); floatingNotificationActionsContainer.AddView(anActionButton); } ; } } if (floatingNotificationView.Visibility != ViewStates.Visible) { floatingNotificationView.Visibility = ViewStates.Visible; } else if (floatingNotificationView.Visibility != ViewStates.Visible) { floatingNotificationView.Visibility = ViewStates.Invisible; } }
private void CatcherHelper_NotificationPosted(object sender, NotificationPostedEventArgs e) { openNotification = new OpenNotification(e.StatusBarNotification); //if the current floating notification widget does not have a tag, let's set it. if (floatingNotificationView.GetTag(Resource.String.defaulttag) == null) { floatingNotificationView.SetTag(Resource.String.defaulttag, openNotification.GetCustomId()); } if (configurationManager.RetrieveAValue(ConfigurationParameters.TestEnabled)) { Toast.MakeText(floatingNotificationView.Context, "Progress Indeterminate?: " + openNotification.IsProgressIndeterminate().ToString() + "\n" + "Current Progress: " + openNotification.GetProgress().ToString() + "\n" + "Max Progress: " + openNotification.GetProgressMax().ToString() + "\n" + openNotification.GetGroupInfo() , ToastLength.Short).Show(); } if (e.UpdatesPreviousNotification) { if ((string)floatingNotificationView.GetTag(Resource.String.defaulttag) == openNotification.GetCustomId()) { floatingNotificationAppName.Text = openNotification.AppName(); floatingNotificationWhen.Text = openNotification.When(); floatingNotificationTitle.Text = openNotification.Title(); floatingNotificationText.Text = openNotification.Text(); floatingNotificationActionsContainer.RemoveAllViews(); if (openNotification.HasActions() == true) { var actions = openNotification.RetrieveActions(); foreach (var a in actions) { OpenAction openAction = new OpenAction(a); float weight = (float)1 / actions.Count; Button anActionButton = new Button(Application.Context) { LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight), Text = openAction.Title(), }; anActionButton.SetTypeface(Typeface.Create("sans-serif-condensed", TypefaceStyle.Normal), TypefaceStyle.Normal); anActionButton.SetMaxLines(1); anActionButton.SetTextColor(Color.Black); anActionButton.Click += (o, eventargs) => { openAction.ClickAction(); }; anActionButton.Gravity = GravityFlags.CenterVertical; TypedValue outValue = new TypedValue(); Application.Context.Theme.ResolveAttribute(Android.Resource.Attribute.SelectableItemBackgroundBorderless, outValue, true); anActionButton.SetBackgroundResource(outValue.ResourceId); //anActionButton.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(), null, null, null); floatingNotificationActionsContainer.AddView(anActionButton); } ; } } } else { //Is a new notification, so set a new tag. floatingNotificationView.SetTag(Resource.String.defaulttag, openNotification.GetCustomId()); floatingNotificationAppName.Text = openNotification.AppName(); floatingNotificationWhen.Text = openNotification.When(); floatingNotificationTitle.Text = openNotification.Title(); floatingNotificationText.Text = openNotification.Text(); floatingNotificationActionsContainer.RemoveAllViews(); if (openNotification.HasActions() == true) { var actions = openNotification.RetrieveActions(); foreach (var a in actions) { OpenAction openAction = new OpenAction(a); float weight = (float)1 / actions.Count; Button anActionButton = new Button(Application.Context) { LayoutParameters = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, weight), Text = openAction.Title(), }; anActionButton.SetTypeface(Typeface.Create("sans-serif-condensed", TypefaceStyle.Normal), TypefaceStyle.Normal); anActionButton.SetMaxLines(1); anActionButton.SetTextColor(Color.Black); anActionButton.Click += (o, eventargs) => { openAction.ClickAction(); }; anActionButton.Gravity = GravityFlags.CenterVertical; TypedValue outValue = new TypedValue(); Application.Context.Theme.ResolveAttribute(Android.Resource.Attribute.SelectableItemBackgroundBorderless, outValue, true); anActionButton.SetBackgroundResource(outValue.ResourceId); //anActionButton.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(), null, null, null); floatingNotificationActionsContainer.AddView(anActionButton); } ; } if (floatingNotificationView.Visibility != ViewStates.Visible) { if (currentActivityState == ActivityStates.Resumed) { floatingNotificationView.Visibility = ViewStates.Visible; } } } }
protected virtual void SetActionIcon(Button action, OpenAction openAction) { action.SetCompoundDrawablesRelativeWithIntrinsicBounds(openAction.GetActionIcon(Android.Graphics.Color.White), null, null, null); }
protected virtual void SetActionTag(Button action, OpenAction openAction) { action.SetTag(DefaultActionIdentificator, openAction); }
public void TestHasClosureReferenceThisMethodLambda() { Action <int> action = i => LocalMethod(i + 1); Assert.That(OpenAction.HasClosureReference(action), Is.False); }
public void TestCreateOpenActionArgumentNull() { Assert.That(() => OpenAction.CreateOpenAction((Action <int>)null), Throws.InstanceOf <ArgumentNullException>()); }