Esempio n. 1
0
        private void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            switch (e.MenuItem.ItemId)
            {
            case (Resource.Id.nav_home):
                btnNavView.Visibility = ViewStates.Invisible;
                actionBar.Title       = "SimulOP";
                LoadFragment(Resource.Id.nav_home);
                break;

            case (Resource.Id.nav_bomba):
                btnNavView.Visibility = ViewStates.Visible;
                btnNavView.Menu.Clear();
                btnNavView.InflateMenu(Resource.Menu.bottom_navigation_bomba);
                btnNavView.SetShiftMode(false, false);
                btnNavView.Menu.GetItem(0).SetChecked(true);
                actionBar.Title = "Bomba";
                LoadFragment(Resource.Id.menu_bomba_fluido);
                break;

            case (Resource.Id.nav_trocador):
                btnNavView.Visibility = ViewStates.Visible;
                btnNavView.Menu.Clear();
                btnNavView.InflateMenu(Resource.Menu.bottom_navigation_trocador);
                btnNavView.SetShiftMode(false, false);
                btnNavView.Menu.GetItem(0).SetChecked(true);
                actionBar.Title = "Trocador";
                LoadFragment(Resource.Id.menu_bomba_resultados);
                break;
            }
            e.MenuItem.SetChecked(true);
            drawerLayout.CloseDrawers();
        }
Esempio n. 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_mainVerifier);
            BottomNavigationView bottomNavigation = FindViewById <BottomNavigationView>(Resource.Id.bottomNavMainVerifier);

            bottomNavigation.InflateMenu(Resource.Menu.menu_navigationV);
            bottomNavigation.NavigationItemSelected += FragmentListener;

            LoadFragment(Resource.Id.itemAdd);
        }
Esempio n. 3
0
        void SetTabItems()
        {
            _bottomNavigationView.InflateMenu(Resource.Menu.bottom_navigation_menu);
            _menuItems.Clear();
            foreach (var page in Element.Children)
            {
                var tab = _bottomNavigationView.Menu.Add(page.Title);

                tab.SetIcon(ResourceManager.GetDrawable(Context.Resources, page.Icon));
                _menuItems.Add(tab);
            }
        }
Esempio n. 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.PacienteDetail);

            Toolbar toolbarTop = FindViewById <Toolbar>(Resource.Id.toolbarTop);

            SetSupportActionBar(toolbarTop);

            // Una marca atrás en el icono en ActionBar
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            _txtNroHistoria   = FindViewById <TextView>(Resource.Id.txtNroHistoria);
            _txtNombre        = FindViewById <TextView>(Resource.Id.txtNombre);
            _txtApellido      = FindViewById <TextView>(Resource.Id.txtApellido);
            _txtEdad          = FindViewById <TextView>(Resource.Id.txtEdad);
            _txtGenero        = FindViewById <TextView>(Resource.Id.txtGenero);
            _txtNroHabitacion = FindViewById <TextView>(Resource.Id.txtNroHabit);
            _txtNroCama       = FindViewById <TextView>(Resource.Id.txtNroCama);

            // Bottom Navigation View (Medicamento | Rotacion)
            _navigation = FindViewById <BottomNavigationView>(Resource.Id.navigation);
            _navigation.InflateMenu(Resource.Menu.bottomNavigation);

            // Deshabilitar Checked Default
            IMenuItem menuItem = _navigation.Menu.GetItem(1);

            menuItem.SetCheckable(false);
            _navigation.Menu.GetItem(1).SetChecked(false);


            // Items Medicamento | Rotacion
            _navigation.NavigationItemSelected += Navigation_NavigationItemSelected;

            // Recibimos el Id Paciente
            var idPaciente = Intent.Extras.GetInt(KEY_ID);

            ViewPacienteDetail(idPaciente);
        }
Esempio n. 5
0
        protected override async void OnCreate(Bundle bundle)
        {
            if (glThema > 0)
            {
                SetTheme(glThema);
            }

            base.OnCreate(bundle);

            SetContentView(Resource.Layout.frmListaPokedex);

            _listView            = FindViewById <ListView>(Resource.Id.listView);
            _listView.ItemClick += _listView_ItemClick;
            _listView.ChoiceMode = ChoiceMode.Single;

            empty      = FindViewById <TextView>(Resource.Id.empty);
            empty.Text = "Nenhum pokemon encontrado";
            empty.SetCompoundDrawablesWithIntrinsicBounds(0, Resource.Drawable.ic_magnify_close_grey600_24dp, 0, 0);

            navigationView = FindViewById <BottomNavigationView>(Resource.Id.navigation_view);
            navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected;
            navigationView.InflateMenu(Resource.Menu.BottomListaPokedex);

            toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            SupportActionBar.Title = "Lista de Pokemons";
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);

            _adapter = new GenericAdapter <ListaLocal>(fLista,
                                                       (convertView) =>
            {
                LayoutInflater mInflater = (LayoutInflater)GetSystemService(Context.LayoutInflaterService);
                return(mInflater.Inflate(Resource.Layout.layListaPokedex, null));
            },

                                                       (convertView, parent, _item) =>
            {
                if (_item.Image != null)
                {
                    ImageView img = convertView.FindViewById <ImageView>(Resource.Id.img);
                    img.Click    -= Img_Click;
                    img.Click    += Img_Click;
                    img.Tag       = parent.Tag;
                    Android.Net.Uri mUri;

                    mUri = Android.Net.Uri.Parse(_item.Image);

                    Picasso.With(this)
                    .Load(mUri)
                    .NetworkPolicy(NetworkPolicy.NoCache)
                    .Error(Resource.Drawable.ic_block_white_24dp)
                    .Fit()
                    .CenterInside()
                    .Into(img);
                }

                TextView txtNome = convertView.FindViewById <TextView>(Resource.Id.txtNome);
                txtNome.SetText(_item.Name, TextView.BufferType.Normal);

                return(convertView);
            });

            _listView.Adapter = _adapter;

            await RequestPokemons();

            //Filtrar();
        }