Пример #1
0
 public void LoadData()
 {
     try
     {
         ListView lv = FindViewById <ListView>(Resource.Id.stepListViewPgm1);
         ProgramStepLineAdapter psla = new ProgramStepLineAdapter(this, programs[selectedPgm]);
         lv.Adapter = psla;
     }
     catch { }
 }
Пример #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.ProgramsLayout);
            ListView     lv  = FindViewById <ListView>(Resource.Id.stepListViewPgm1);
            ProgramClass pgm = new ProgramClass();

            pgm.numSteps = 4;
            pgm.steps[0] = new ProgramStepClass()
            {
                station = 1, duration = 10
            };
            pgm.steps[1] = new ProgramStepClass()
            {
                station = 2, duration = 11
            };
            pgm.steps[2] = new ProgramStepClass()
            {
                station = 3, duration = 12
            };
            pgm.steps[3] = new ProgramStepClass()
            {
                station = 4, duration = 13
            };
            pgm.steps[4] = new ProgramStepClass()
            {
                station = 2, duration = 14
            };
            pgm.steps[5] = new ProgramStepClass()
            {
                station = 1, duration = 15
            };
            pgm.steps[6] = new ProgramStepClass()
            {
                station = 4, duration = 16
            };
            pgm.steps[7] = new ProgramStepClass()
            {
                station = 3, duration = 17
            };
            pgm.steps[8] = new ProgramStepClass()
            {
                station = 2, duration = 18
            };
            pgm.steps[9] = new ProgramStepClass()
            {
                station = 4, duration = 19
            };

            ProgramStepLineAdapter psla = new ProgramStepLineAdapter(this, pgm);

            lv.Adapter = psla;
        }
Пример #3
0
        protected async override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.ProgramsLayout);
            ListView      lv      = FindViewById <ListView>(Resource.Id.stepListViewPgm1);
            Spinner       sp      = FindViewById <Spinner>(Resource.Id.spinnerPgm1);
            List <string> strings = new List <string>()
            {
                "1-es Program", "2-es Program", "3-as Program", "4-es Program", "5-ös Program", "6-os Program", "7-es Program", "8-as Program", "9-es Program", "10-es Program"
            };
            ArrayAdapter <string> dataAdapter = new ArrayAdapter <string>(this, Resource.Layout.support_simple_spinner_dropdown_item, strings);

            sp.Adapter = dataAdapter;
            sp.SetSelection(selectedPgm);
            sp.ItemSelected += Sp_ItemSelected;

            BottomNavigationView navigation = FindViewById <BottomNavigationView>(Resource.Id.BNWPgm);

            navigation.SetOnNavigationItemSelectedListener(this);
            navigation.SelectedItemId = Resource.Id.navigation_programs;

            await GetPrograms();

            ProgramStepLineAdapter psla = new ProgramStepLineAdapter(this, programs[selectedPgm]);

            lv.Adapter    = psla;
            lv.ItemClick += Lv_ItemClick;

            Button pbt = FindViewById <Button>(Resource.Id.plusButtonPgm1);

            pbt.Click += Pbt_Click;

            Button mbt = FindViewById <Button>(Resource.Id.minusButtonPgm1);

            mbt.Click += Mbt_Click;
        }