示例#1
0
        protected override void OnCreate(Bundle bundle)
        {
            ActivityHelper.ApplyLevelColors(Theme);
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.LevelSponsor);
            ivSplashscreen = FindViewById <ImageView>(Resource.Id.ivSplashscreen);
            SetSupportActionBar(FindViewById <Toolbar>(Resource.Id.toolbar));
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            //this.SetSystemBarBackground (Color.ParseColor (DataHolder.Current.CurrentLevel.Color));
            RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;

            // Set title
            Title = DataHolder.Current.CurrentLevel.Name;

            var closeButton = FindViewById <FloatingActionButton>(Resource.Id.btnClose);

            closeButton.Click += CloseButton_Click;
        }
示例#2
0
        protected override void OnCreate(Bundle bundle)
        {
            ActivityHelper.ApplyLevelColors(Theme);
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.LessonFrame);
            SetSupportActionBar(FindViewById <Toolbar>(Resource.Id.toolbar));
            //this.SetSystemBarBackground (Color.ParseColor (DataHolder.Current.CurrentModule.Color));
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;
            progressList         = new List <Progress>();

            ivGoBack        = FindViewById <ImageView>(Resource.Id.ivGoBack);
            ivGoBack.Click += ((sender, e) => PreviousLesson());
            ivGoFwd         = FindViewById <ImageView>(Resource.Id.ivGoFwd);
            ivGoFwd.Click  += ((sender, e) => NextLesson());
            btnNext         = FindViewById <FloatingActionButton>(Resource.Id.btnNext);
            btnNext.Click  += BtnNext_Click_CheckSolution;
            if (!Env.LollipopSupport)
            {
                var layoutParams = btnNext.LayoutParameters as RelativeLayout.LayoutParams;
                layoutParams.BottomMargin = (int)(-46 * Resources.DisplayMetrics.Density);
            }

            rvProgress = FindViewById <RecyclerView>(Resource.Id.rvProgress);
            rvProgress.SetLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.Horizontal, false));
            rvProgress.SetAdapter(new ProgressAdapter(progressList,
                                                      Color.ParseColor(DataHolder.Current.CurrentLevel.Color),
                                                      Color.ParseColor(DataHolder.Current.CurrentModule.Color),
                                                      Resources.DisplayMetrics.Density));
            txtCapitalAlphabet = FindViewById <TextView>(Resource.Id.txtCapitalAlphabet);
            txtLowerAlphabet   = FindViewById <TextView>(Resource.Id.txtLowerAlphabet);
            fragmentContainer  = FindViewById <FrameLayout>(Resource.Id.fragmentContainer);
            ivBadge            = FindViewById <ImageView>(Resource.Id.ivBadge);
            ivIrmgard          = FindViewById <ImageView>(Resource.Id.ivIrmgard);
            ivIrmgard.Click   += (s, e) => PlayOrStopInstruction();

            // Initially hide success image
            ivBadge.Visibility = ViewStates.Gone;

            praiseFilesAvail    = AssetHelper.Instance.List(Path.Combine(Common.AssetSoundDir, Common.AssetPraiseDir)).Select(s => Path.Combine(Common.AssetPraiseDir, s)).ToList();
            criticismFilesAvail = AssetHelper.Instance.List(Path.Combine(Common.AssetSoundDir, Common.AssetCriticismDir)).Select(s => Path.Combine(Common.AssetCriticismDir, s)).ToList();
        }
示例#3
0
        protected override void OnCreate(Bundle bundle)
        {
            ActivityHelper.ApplyLevelColors(Theme);
            base.OnCreate(bundle);
            RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;
            SetContentView(Resource.Layout.Video);
            this.SetSystemBarBackground(Color.Black);

            // Read context
            nextView  = Intent.Extras.GetString("nextView");
            videoPath = Intent.Extras.GetString("videoPath");

            FindViewById <FloatingActionButton>(Resource.Id.btnNext).Click   += BtnNext_Click;
            FindViewById <FloatingActionButton>(Resource.Id.btnRepeat).Click += BtnRepeat_Click;
            videoView = FindViewById <VideoView>(Resource.Id.videoView);

            var holder = videoView.Holder;

            holder.AddCallback(this);
        }