protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			SetContentView(Resource.Layout.action_bar_display_options);

			FindViewById(Resource.Id.toggle_home_as_up).SetOnClickListener(this);
			FindViewById(Resource.Id.toggle_show_home).SetOnClickListener(this);
			FindViewById(Resource.Id.toggle_use_logo).SetOnClickListener(this);
			FindViewById(Resource.Id.toggle_show_title).SetOnClickListener(this);
			FindViewById(Resource.Id.toggle_show_custom).SetOnClickListener(this);
			FindViewById(Resource.Id.toggle_navigation).SetOnClickListener(this);
			FindViewById(Resource.Id.cycle_custom_gravity).SetOnClickListener(this);
			FindViewById(Resource.Id.toggle_visibility).SetOnClickListener(this);

			// Configure several action bar elements that will be toggled by display options.
			mCustomView = LayoutInflater.Inflate(Resource.Layout.action_bar_display_options_custom, null);
			mCustomViewLayoutParams = new Android.Support.V7.App.ActionBar.LayoutParams(
				Android.Support.V7.App.ActionBar.LayoutParams.WrapContent, 
				Android.Support.V7.App.ActionBar.LayoutParams.WrapContent);

			ActionBar bar = SupportActionBar;
			bar.SetCustomView(mCustomView, mCustomViewLayoutParams);
			bar.AddTab(bar.NewTab().SetText("Tab 1").SetTabListener(this));
			bar.AddTab(bar.NewTab().SetText("Tab 2").SetTabListener(this));
			bar.AddTab(bar.NewTab().SetText("Tab 3").SetTabListener(this));
		}
            public void OnClick(View view)
            {
                var renderer = view.Tag as AppCompatButtonRenderer;

                if (renderer == null)
                {
                    return;
                }

                renderer.Element.InvokeSendClicked();
            }
        protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ListView> e)
        {
            base.OnElementChanged (e);

            if (e.NewElement == null)
            {
                return;
            }

            var element = Element as AdvancedListView;

            if (Control != null)
            {
                UpdateVerticalScrollbar (element);

                Control.Scroll += (object sender, AbsListView.ScrollEventArgs e2) => {
                    //                  System.Diagnostics.Debug.WriteLine ("{0} -> {1}", scrollY, Control.MaxScrollAmount);
                    ReportContentOffset (element);
                    UpdateAffordances ();
                };
                Control.ScrollStateChanged += (object sender, AbsListView.ScrollStateChangedEventArgs e2) => {

                };

                _topOverlayMask = new GradientDrawable ();
                _topOverlayView = new Android.Views.View (Forms.Context);
                _topOverlayView.SetBackgroundDrawable (_topOverlayMask);
                AddView (_topOverlayView);

                _bottomOverlayMask = new GradientDrawable ();
                _bottomOverlayView = new Android.Views.View (Forms.Context);
                _bottomOverlayView.SetBackgroundDrawable (_bottomOverlayMask);
                AddView (_bottomOverlayView);

                UpdateAffordanceColors ();
                RequestLayout ();
            }
        }
Ejemplo n.º 4
0
 public static void SetMeasuredDimensions(View view, int width, int height)
 {
     LayouterHelper.SetMeasuredDimensions(view, new object[] { width, height });
 }
Ejemplo n.º 5
0
 void AView.IOnAttachStateChangeListener.OnViewDetachedFromWindow(AView detachedView)
 {
 }
Ejemplo n.º 6
0
 protected override void OnListItemClick(ListView l, Android.Views.View v, int position, long id)
 {
     StartActivity(new Intent(this, Samples[position].ActivityType));
 }
Ejemplo n.º 7
0
 public static void InvalidateMeasure(this AView nativeView, IView view)
 {
     nativeView.RequestLayout();
 }
Ejemplo n.º 8
0
            public void OnClick(AView v)
            {
                var renderer = v.Tag as ButtonRenderer;

                ((IButtonController)renderer?.Element)?.SendClicked();
            }
Ejemplo n.º 9
0
		public static void Add(this IList<View> children, AView view, GetDesiredSizeDelegate getDesiredSizeDelegate = null, OnLayoutDelegate onLayoutDelegate = null,
							   OnMeasureDelegate onMeasureDelegate = null)
		{
			children.Add(view.ToView(getDesiredSizeDelegate, onLayoutDelegate, onMeasureDelegate));
		}
Ejemplo n.º 10
0
 public static bool GetClipToOutline(this AView view)
 {
     return(view.ClipToOutline);
 }
Ejemplo n.º 11
0
 public static void SetColumn(View view, int column)
 {
     DependencyObjectExtensions.SetValue(view, ColumnProperty, column);
 }
Ejemplo n.º 12
0
 public static int GetRowSpan(View view)
 {
     return((int)DependencyObjectExtensions.GetValue(view, RowSpanProperty));
 }
Ejemplo n.º 13
0
 public void OnViewDetachedFromWindow(AView detachedView)
 {
 }
Ejemplo n.º 14
0
 public static void SetRow(View view, int row)
 {
     DependencyObjectExtensions.SetValue(view, RowProperty, row);
 }
Ejemplo n.º 15
0
 public void OnViewAttachedToWindow(AView attachedView)
 {
     UpdateText();
 }
Ejemplo n.º 16
0
 public TemplateEntry(TimeSpan creationTime, View dependencyObject)
 {
     CreationTime = creationTime;
     Control      = dependencyObject;
 }
Ejemplo n.º 17
0
 public static void ShowKeyboard(View view)
 {
     MethodShowKeyboard.Invoke(null, new object[] { view });
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Manually return an unused template root created by <see cref="LoadContentCached"/> to the pool.
 /// </summary>
 /// <remarks>
 /// This is only used in specialized contexts. Normally the template reuse will be automatically handled by the pool.
 /// </remarks>
 internal void ReleaseTemplateRoot(View templateRoot) => FrameworkTemplatePool.Instance.ReleaseTemplateRoot(templateRoot, this);
Ejemplo n.º 19
0
 protected override void ConnectHandler(NativeView nativeView)
 {
     base.ConnectHandler(nativeView);
     VirtualView.Handler = this;
 }
Ejemplo n.º 20
0
 public View(Android.Views.View child, bool wasCached)
 {
     this.view      = child;
     this.wasCached = wasCached;
 }
Ejemplo n.º 21
0
 public ViewPosition(View key, GridPosition value)
 {
     Key   = key;
     Value = value;
 }
Ejemplo n.º 22
0
 protected abstract int VisiblePortion(AView view, OrientationHelper orientationHelper, bool rtl);
Ejemplo n.º 23
0
 public Android.Views.View GetDropDownView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
 {
     return(_adapter.GetDropDownView(position, convertView, parent));
 }
Ejemplo n.º 24
0
 public static void SetClipToOutline(this AView view, bool value)
 {
     view.ClipToOutline = value;
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Provides the desired size of the element, from the last measure phase.
 /// </summary>
 /// <param name="view">The element to get the measured with</param>
 /// <returns>The measured size</returns>
 Size ILayouter.GetDesiredSize(View view)
 {
     return(DesiredChildSize(view));
 }
Ejemplo n.º 26
0
 public void OnClick(AView v)
 {
     ((DatePickerRenderer)v.Tag).OnTextFieldClicked();
 }
Ejemplo n.º 27
0
        protected Size DesiredChildSize(View view)
        {
            var uiElement = view as UIElement;

            return(uiElement?.DesiredSize ?? LayouterHelper.LayoutProperties.GetValue(view, "desiredSize", () => default(Size)));
        }
Ejemplo n.º 28
0
 void AView.IOnAttachStateChangeListener.OnViewAttachedToWindow(AView attachedView)
 {
     UpdateText();
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HasOnViewAttachListenerDelegate"/> class.
 /// </summary>
 /// <param name="view">The view.</param>
 public HasOnViewAttachListenerDelegate(View view)
 {
     _view = view;
 }
Ejemplo n.º 30
0
 partial void RegisterSubView(View child);
 public override bool IsViewFromObject(View view, Java.Lang.Object objectValue)
 {
     return view == objectValue;
 }
Ejemplo n.º 32
0
 protected override void FindViews(Android.Views.View view)
 {
     base.FindViews(view);
     view.FindView(ref _gettingStartedTextView, Resource.Id.getting_started_text);
 }
 public HasOnViewAttachListenerDelegate(View view)
 {
     _view = view;
 }
Ejemplo n.º 34
0
 protected abstract void MeasureChild(View view, int widthSpec, int heightSpec);
 public override void OnDrawerOpened(View drawerView)
 {
     base.OnDrawerOpened(drawerView);
     this.appCompatDelegate.InvalidateOptionsMenu();
     this.owner.OnDrawerOpened(drawerView);
 }
Ejemplo n.º 36
0
 public override void ChildDrawableStateChanged(Android.Views.View child)
 {
     base.ChildDrawableStateChanged(child);
     Control.Text = Control.Text;
 }
Ejemplo n.º 37
0
 public override void SetCustomView(View view, LayoutParams layoutParams)
 {
     this.SupportActionBar.SetCustomView(view, new LayoutParamsAdapter(layoutParams));
 }
Ejemplo n.º 38
0
        protected virtual void OnWizardStepChanged()
        {
            // In order to hide software input method we need to authorize with window token from focused window
            // this code relies on (somewhat fragile) assumption, that the only window, that can hold
            // software keyboard focus during fragment switch, one with fragment itself.
            var inputMethodManager = Android.Views.InputMethods.InputMethodManager.FromContext(Activity);

            var focusedWindowChild = Wizard.CurrentStep == null ? null : Wizard.CurrentStep.View;

            if (focusedWindowChild == null)
                focusedWindowChild = Activity.CurrentFocus;

            if (focusedWindowChild == null)
                focusedWindowChild = new Android.Views.View(Activity);

            inputMethodManager.HideSoftInputFromWindow(focusedWindowChild.WindowToken, 0);
        }
Ejemplo n.º 39
0
 partial void RemoveViewPartial(View current);
 public void OnClick(View v)
 {    
     LoginManager.Instance.LogInWithReadPermissions(_activity, new List<string> { "public_profile" });
 }
 public void OnClick(View v)
 {
     var myIntent = new Intent(_activity, typeof(FacebookActivity));
     _activity.StartActivityForResult(myIntent, 0);
 }
 public override void OnDrawerSlide(View drawerView, float slideOffset)
 {
     base.OnDrawerSlide(drawerView, slideOffset);
     this.owner.OnDrawerSlide(drawerView, slideOffset);
 }
Ejemplo n.º 43
0
        protected int[] CalculateDistanceToFinalSnap(RecyclerView.LayoutManager layoutManager, AView targetView,
                                                     int direction = 1)
        {
            var orientationHelper = CreateOrientationHelper(layoutManager);
            var isHorizontal      = layoutManager.CanScrollHorizontally();
            var rtl = isHorizontal && IsLayoutReversed(layoutManager);

            var size = orientationHelper.GetDecoratedMeasurement(targetView);

            var hiddenPortion = size - VisiblePortion(targetView, orientationHelper, rtl);

            var distance = (rtl ? hiddenPortion : -hiddenPortion) * direction;

            return(isHorizontal
                                ? new[] { distance, 1 }
                                : new[] { 1, distance });
        }