示例#1
0
        public TestingActivity()
        {
            Sec = 1800;

            TicketsCount      = 30;
            Position          = 0;
            CorrectAns        = 0;
            FailedAns         = 0;
            MaxIncorrectCount = 3;
            Timer             = new Timer();
            Answers           = new List <string>();
            Animations        = new AndroidAnimations(this);
        }
示例#2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_category);

            Online = Intent.GetBooleanExtra("Online", false);

            Recycler = FindViewById <RecyclerView>(Resource.Id.categoryRecycler);

            Recycler.SetLayoutManager(new GridLayoutManager(this, 3));
            Animations = new AndroidAnimations(this);

            Load();
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_download);

            Categoryes = new List <string>();

            CategoryesDownload = FindViewById <RecyclerView>(Resource.Id.CategoryesDownload);
            DownloadBtn        = FindViewById <Button>(Resource.Id.DownloadBtn);
            WithImage          = FindViewById <CheckBox>(Resource.Id.WithImage);

            DownloadBtn.Click += Download;
            CategoryesDownload.SetLayoutManager(new GridLayoutManager(this, 3));
            Animations = new AndroidAnimations(this);

            LoadInfo();
        }
示例#4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_topic);

            Recycler    = FindViewById <RecyclerView>(Resource.Id.TopicRecycler);
            Confirm     = FindViewById <ImageView>(Resource.Id.StartTestImg);
            ProgressBar = FindViewById <ProgressBar>(Resource.Id.DownloadingProgress);

            var manager = new LinearLayoutManager(this)
            {
                Orientation = (int)Orientation.Vertical
            };

            Recycler.SetLayoutManager(manager);

            Online   = Intent.GetBooleanExtra("Online", false);
            Category = Intent.GetStringExtra("Category");

            Animations = new AndroidAnimations(this);
            try
            {
                Load();
            }
            catch (Java.Net.UnknownHostException)
            {
                Android.Support.V7.App.AlertDialog.Builder alert = new Android.Support.V7.App.AlertDialog.Builder(this);
                alert.SetTitle("ინტერნეტის კავშირი");
                alert.SetMessage("ეს აპლიკაცია ირთვება პირვლად იმისთვის რომ ჩაირთოს საჭიროა ინტერნეტთან კავშირი შეკითხვების გადმოსაწერათ ერთჯერადი კავშირია.");

                Dialog dialog = alert.Create();
                dialog.Show();
            }

            // hide Loaging Animation
            ProgressBar.Visibility = Android.Views.ViewStates.Gone;
            Confirm.Click         += StartTesting;
        }