Exemplo n.º 1
0
        View CreateActionItemContainer()
        {
            View container;

            if (_orientation == QuickActionLayout.Horizontal)
            {
                container = _inflater.Inflate(Resource.Layout.action_item_horizontal, null);
            }
            else
            {
                container = _inflater.Inflate(Resource.Layout.action_item_vertical, null);
            }
            container.Focusable = true;
            container.Clickable = true;
            var pos = _childPos;

            container.Click += (sender, e) => {
                if (ActionItemClicked != null)
                {
                    var arg = new ActionItemClickEventArgs(this, pos);
                    ActionItemClicked(container, arg);
                }

                if (GetActionItem(pos).IsSticky)
                {
                    return;
                }
                _didAction = true;
                Dismiss();
            };


            return(container);
        }
Exemplo n.º 2
0
 void HandleActionItemClicked(object sender, ActionItemClickEventArgs e)
 {
     switch (e.ActionItem.ActionId)
     {
         case QUICKACTION_DISTANCEDEMO:
             this.StartActivityForBeacon<DistanceBeaconActivity>(_selectedBeacon);
             break;
         case QUICKACTION_NOTIFYDEMO:
             this.StartActivityForBeacon<NotifyDemoActivity>(_selectedBeacon);
             break;
         default:
             Log.Wtf(Tag, "Don't know how to handle the ActionItem {0}.", e.ActionItem.Title);
             break;
     }
     _selectedBeacon = null;
 }
Exemplo n.º 3
0
        void HandleActionItemClicked(object sender, ActionItemClickEventArgs e)
        {
            switch (e.ActionItem.ActionId)
            {
            case QUICKACTION_DISTANCEDEMO:
                this.StartActivityForBeacon <DistanceBeaconActivity>(_selectedBeacon);
                break;

            case QUICKACTION_NOTIFYDEMO:
                this.StartActivityForBeacon <NotificationActivity>(_selectedBeacon);
                break;

            default:
                Log.Wtf(Tag, "Don't know how to handle the ActionItem {0}.", e.ActionItem.Title);
                break;
            }
            _selectedBeacon = null;
        }
Exemplo n.º 4
0
        View CreateActionItemContainer()
        {
            View container;
            if (_orientation == QuickActionLayout.Horizontal)
            {
                container = _inflater.Inflate(Resource.Layout.action_item_horizontal, null);
            }
            else
            {
                container = _inflater.Inflate(Resource.Layout.action_item_vertical, null);
            }
            container.Focusable = true;
            container.Clickable = true;
            var pos = _childPos;
            container.Click += (sender, e) =>{
                if (ActionItemClicked != null)
                {
                    var arg = new ActionItemClickEventArgs(this, pos);
                    ActionItemClicked(container, arg);
                }

                if (GetActionItem(pos).IsSticky)
                {
                    return;
                }
                _didAction = true;
                Dismiss();
            };


            return container;
        }