Example #1
0
 public MaterialFrameRenderer(Context context)
     : base(MaterialContextThemeWrapper.Create(context))
 {
     _gestureManager        = new GestureManager(this);
     _effectControlProvider = new EffectControlProvider(this);
     _motionEventHelper     = new MotionEventHelper();
 }
Example #2
0
        public MaterialProgressBarRenderer(Context context)
            : base(MaterialContextThemeWrapper.Create(context), null, Resource.Attribute.materialProgressBarHorizontalStyle)
        {
            Indeterminate = false;
            Max           = MaximumValue;

            _visualElementRenderer = new VisualElementRenderer(this);
            _motionEventHelper     = new MotionEventHelper();
        }
Example #3
0
        public MaterialSliderRenderer(Context context)
            : base(MaterialContextThemeWrapper.Create(context), null, Resource.Attribute.materialSliderStyle)
        {
            SetOnSeekBarChangeListener(this);
            Max = (int)MaximumValue;

            _visualElementRenderer = new VisualElementRenderer(this);
            _motionEventHelper     = new MotionEventHelper();
        }
Example #4
0
        AButton IStepperRenderer.CreateButton()
        {
            var button = new MButton(MaterialContextThemeWrapper.Create(Context), null, Resource.Attribute.materialOutlinedButtonStyle);

            // the buttons are meant to be "square", but are usually wide,
            // so, copy the vertical properties into the horizontal properties
            button.SetMinimumWidth(button.MinimumHeight);
            button.SetMinWidth(button.MinHeight);
            button.SetPadding(button.PaddingTop, button.PaddingTop, button.PaddingBottom, button.PaddingBottom);

            return(button);
        }
Example #5
0
        public MaterialActivityIndicatorRenderer(Context context)
            : base(context)
        {
            _control = new CircularProgress(MaterialContextThemeWrapper.Create(context), null, Resource.Attribute.materialProgressBarCircularStyle)
            {
                // limiting size to compare iOS realization
                // https://github.com/material-components/material-components-ios/blob/develop/components/ActivityIndicator/src/MDCActivityIndicator.m#L425
                MinSize      = (int)Context.ToPixels(10),
                MaxSize      = (int)Context.ToPixels(144),
                DefaultColor = MaterialColors.Light.PrimaryColor
            };
            AddView(Control);

            _visualElementRenderer = new VisualElementRenderer(this);
            _motionEventHelper     = new MotionEventHelper();
        }
        public MaterialButtonRenderer(Context context, BindableObject element)
            : base(MaterialContextThemeWrapper.Create(context))
        {
            _automationPropertiesProvider = new AutomationPropertiesProvider(this);
            _buttonLayoutManager          = new ButtonLayoutManager(this,
                                                                    alignIconWithText: true,
                                                                    preserveInitialPadding: true,
                                                                    borderAdjustsPadding: false,
                                                                    maintainLegacyMeasurements: false);

            SoundEffectsEnabled = false;
            SetOnClickListener(this);
            SetOnTouchListener(this);
            AddOnAttachStateChangeListener(this);
            OnFocusChangeListener = this;

            Tag = this;
        }
 public MaterialButtonRenderer(Context context)
     : this(MaterialContextThemeWrapper.Create(context), null)
 {
 }
Example #8
0
 public MaterialEditorRenderer(Context context) :
     base(MaterialContextThemeWrapper.Create(context))
 {
 }
Example #9
0
 public MaterialDatePickerRenderer(Context context) : base(MaterialContextThemeWrapper.Create(context))
 {
 }
Example #10
0
 public MaterialCheckBoxRenderer(Context context) : base(MaterialContextThemeWrapper.Create(context), Resource.Attribute.materialCheckBoxStyle)
 {
 }