public void setGesture(MotionEvent e) { FragmentoConfiguration fragmentoConfiguration = new FragmentoConfiguration(); bool tirillaDePagoShowing = FragmentIsShowing("TIRILLA_DE_PAGO"); int MIN_DISTANCE = 500; switch (e.Action) { case MotionEventActions.Down: y1 = e.GetY(); break; case MotionEventActions.Up: y2 = e.GetY(); float deltaY = y2 - y1; if (Math.Abs(deltaY) > MIN_DISTANCE) { if (y2 > y1 && !tirillaDePagoShowing) { FragmentoTirillaDePago fragmentoTirillaDePago = new FragmentoTirillaDePago(); fragmentoConfiguration.replaceFragments(fragmentoTirillaDePago, Resource.Id.panel, "TIRILLA_DE_PAGO", FragmentManager); } else if (y1 > y2 && tirillaDePagoShowing) { FragmentoTirillaDePago frag = (FragmentoTirillaDePago)FragmentManager.FindFragmentByTag("TIRILLA_DE_PAGO"); fragmentoConfiguration.removeFragment(frag, FragmentManager); } } break; } }
private void ShowTirillaDePago_Click(object sender, EventArgs e) { FragmentoConfiguration fragmentoConfiguration = new FragmentoConfiguration(); if (!fragmentoConfiguration.fragmentIsShowing("TIRILLA_DE_PAGO", FragmentManager)) { FragmentoTirillaDePago tirillaDePago = new FragmentoTirillaDePago(); fragmentoConfiguration.replaceFragments(tirillaDePago, Resource.Id.panel, "TIRILLA_DE_PAGO", FragmentManager); } }
public void AddArticleButton() { //articulosComprados.Add(articulo); //FragmentoVistaOperador frag = (FragmentoVistaOperador)FragmentManager.FindFragmentByTag("VistaOperador"); //frag.AddArticle(articulo); FragmentoTirillaDePago fragmentoTirilla = (FragmentoTirillaDePago)FragmentManager.FindFragmentByTag("TIRILLA_DE_PAGO"); if (FragmentIsShowing("TIRILLA_DE_PAGO")) { } //fragmentoTirilla.AddProductToTirilla(); }