public override Java.Lang.Object InstantiateItem(ViewGroup container, int position) { int tabSeleccionado = position; SlidingTabsFragment stf = new SlidingTabsFragment(); View view = LayoutInflater.From(container.Context).Inflate(Resource.Layout.ListaMonitorizacionLayout, container, false); monitorizacionListView = view.FindViewById <ListView>(Resource.Id.listViewMonitorizacion); monitorizacionListView.Adapter = getListaMonitorizacion(items[position].ToString()); monitorizacionListView.ItemClick += (sender, e) => { Android.Support.V4.App.Fragment fragment = new AlmacenRepuestosXamarin.Fragments.DetallePedidoVenta(); string codPedido = ((AdapterMonitoriaion)((ListView)sender).Adapter).list[e.Position].Cod__Agrupacion_Pedido; Bundle bundle = new Bundle(); bundle.PutString("codPedido", codPedido); fragment.Arguments = bundle; context.SupportFragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, fragment) .AddToBackStack("ListadoMonitorizacion") .Commit(); }; container.AddView(view); return(view); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.FirstView); FragmentTransaction transaction = FragmentManager.BeginTransaction(); SlidingTabsFragment fragment = new SlidingTabsFragment(FirstViewModel); transaction.Replace(Resource.Id.sample_content_fragment, fragment); transaction.Commit(); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.sliding_tabs); FragmentTransaction transaction = FragmentManager.BeginTransaction(); SlidingTabsFragment fragment = new SlidingTabsFragment(); transaction.Replace(Resource.Id.sample_content_fragment, fragment); transaction.Commit(); }
private void ListItemClicked(int position) { Android.Support.V4.App.Fragment fragment = null; SupportActionBar.Subtitle = "Peazo App"; switch (position) { case 0: SupportActionBar.Title = this.title = Sections[position]; fragment = new BuscadorEmpleados(); SupportFragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, fragment) .Commit(); break; case 1: //MenuInflater.Inflate(Resource.Menu.menu, _imenu); fragment = new ListadoMonitorizacion(); SupportFragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, fragment) .Commit(); break; case 2: fragment = new SlidingTabsFragment(); SupportFragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, fragment) .Commit(); //var sinoptico = new Intent(this, typeof(SinopticoActivity)); //StartActivity(sinoptico); break; case 3: //actityConfiguracion var actityConfiguracion = new Intent(this, typeof(OpcionesActivity)); StartActivity(actityConfiguracion); break; } this.drawerListView.SetItemChecked(position, true); this.drawerLayout.CloseDrawers(); }
// Define a authenticated user. protected override async void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main2); FragmentTransaction transaction = FragmentManager.BeginTransaction(); SlidingTabsFragment fragment = new SlidingTabsFragment(); transaction.Replace(Resource.Id.sample_content_fragment, fragment); transaction.Commit(); // SetUpMap(); // Android.Gms.Fitness.IRecordingApi // CurrentPlatform.Init(); // Create the Mobile Service Client instance, using the provided // Mobile Service URL // client = new MobileServiceClient(applicationURL); // await InitLocalStoreAsync(); // Get the Mobile Service sync table instance to use // toDoTable = client.GetSyncTable<ToDoItem>(); // textNewToDo = FindViewById<EditText>(Resource.Id.textNewToDo); // Create an adapter to bind the items with the view // adapter = new ToDoItemAdapter(this, Resource.Layout.Row_List_To_Do); // var listViewToDo = FindViewById<ListView>(Resource.Id.listViewToDo); // listViewToDo.Adapter = adapter; // Load the items from the Mobile Service // OnRefreshItemsSelected(); }