Ejemplo n.º 1
0
        private void SetMarginRight(int marginRight, bool convertToDp)
        {
            try
            {
                LayoutParams layoutParams = (LayoutParams)SlideToCancelLayout.LayoutParameters;
                if (layoutParams != null)
                {
                    if (convertToDp)
                    {
                        layoutParams.RightMargin = (int)DpUtil.ToPixel(marginRight, Context);
                    }
                    else
                    {
                        layoutParams.RightMargin = marginRight;
                    }

                    SlideToCancelLayout.LayoutParameters = layoutParams;
                }
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
Ejemplo n.º 2
0
        private void SetCancelBounds(float cancelBounds, bool convertDpToPixel)
        {
            float bounds = convertDpToPixel ? DpUtil.ToPixel(cancelBounds, Context) : cancelBounds;

            CancelBounds = bounds;
        }