Esempio n. 1
0
 public MaterialFrameRenderer(Context context)
     : base(MaterialContextThemeWrapper.Create(context))
 {
     _gestureManager        = new GestureManager(this);
     _effectControlProvider = new EffectControlProvider(this);
     _motionEventHelper     = new MotionEventHelper();
 }
Esempio n. 2
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();
        }
        public MaterialProgressBarRenderer(Context context)
            : base(MaterialContextThemeWrapper.Create(context), null, Resource.Attribute.materialProgressBarHorizontalStyle)
        {
            Indeterminate = false;
            Max           = MaximumValue;

            _visualElementRenderer = new VisualElementRenderer(this);
            _motionEventHelper     = new MotionEventHelper();
        }
Esempio n. 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);
        }
        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();
        }
Esempio n. 6
0
        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;
        }
Esempio n. 7
0
 public MaterialCheckBoxRenderer(Context context) : base(MaterialContextThemeWrapper.Create(context), Resource.Attribute.materialCheckBoxStyle)
 {
 }
Esempio n. 8
0
 public MaterialTimePickerRenderer(Context context) : base(MaterialContextThemeWrapper.Create(context))
 {
 }
Esempio n. 9
0
 public MaterialEditorRenderer(Context context) :
     base(MaterialContextThemeWrapper.Create(context))
 {
 }
Esempio n. 10
0
 public MaterialButtonRenderer(Context context)
     : this(MaterialContextThemeWrapper.Create(context), null)
 {
 }