Esempio n. 1
0
 public void OnPageChanged(AXEmojiPager emojiPager, AXEmojiBase @base, int position)
 {
     try
     {
         Drawable drawable;
         if (AXEmojiManager.IsAXEmojiView(@base))
         {
             drawable = AppCompatResources.GetDrawable(Context, Resource.Drawable.emoji_backspace);
             Utils.EnableBackspaceTouch(Footer, emojiPager.EditText);
             Footer.SetOnClickListener(null);
         }
         else
         {
             drawable = AppCompatResources.GetDrawable(Context, Resource.Drawable.ic_action_search);
             Footer.SetOnTouchListener(null);
             Footer.SetOnClickListener(this);
         }
         DrawableCompat.SetTint(DrawableCompat.Wrap(drawable), AXEmojiManager.EmojiViewTheme.FooterItemColor);
         Img.SetImageDrawable(drawable);
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
Esempio n. 2
0
        public void Initialize()
        {
            try
            {
                HomeButton         = MainContext.FindViewById <LinearLayout>(Resource.Id.llHome);
                NotificationButton = MainContext.FindViewById <FrameLayout>(Resource.Id.llNotification);
                ProfileButton      = MainContext.FindViewById <LinearLayout>(Resource.Id.llProfile);
                TrendButton        = MainContext.FindViewById <LinearLayout>(Resource.Id.llTrend);
                MessagesButton     = MainContext.FindViewById <LinearLayout>(Resource.Id.llMessages);

                HomeImage         = MainContext.FindViewById <ImageView>(Resource.Id.ivHome);
                NotificationImage = MainContext.FindViewById <ImageView>(Resource.Id.ivNotification);
                ProfileImage      = MainContext.FindViewById <ImageView>(Resource.Id.ivProfile);
                TrendImage        = MainContext.FindViewById <ImageView>(Resource.Id.ivTrend);
                MessagesImage     = MainContext.FindViewById <ImageView>(Resource.Id.ivMessages);

                HomeButton.SetOnClickListener(this);
                TrendButton.SetOnClickListener(this);
                NotificationButton.SetOnClickListener(this);
                ProfileButton.SetOnClickListener(this);
                MessagesButton.SetOnClickListener(this);
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public void Initialize()
        {
            try
            {
                MainLayout         = MainContext.FindViewById <LinearLayout>(Resource.Id.llMain);
                HomeButton         = MainContext.FindViewById <LinearLayout>(Resource.Id.llHome);
                ResponseHomeButton = MainContext.FindViewById <LinearLayout>(Resource.Id.llResponseHome);
                TrendButton        = MainContext.FindViewById <LinearLayout>(Resource.Id.llTrend);
                BlogButton         = MainContext.FindViewById <LinearLayout>(Resource.Id.llBlog);
                NotificationButton = MainContext.FindViewById <FrameLayout>(Resource.Id.llNotification);
                ProfileButton      = MainContext.FindViewById <LinearLayout>(Resource.Id.llProfile);

                if (!UserDetails.IsLogin)
                {
                    BlogButton.Visibility         = ViewStates.Gone;
                    NotificationButton.Visibility = ViewStates.Gone;
                    ProfileButton.Visibility      = ViewStates.Gone;

                    MainLayout.WeightSum = 2;
                }
                else
                {
                    if (!AppSettings.ShowArticle)
                    {
                        BlogButton.Visibility = ViewStates.Gone;
                        MainLayout.WeightSum  = 4;
                    }
                }

                HomeImage         = MainContext.FindViewById <ImageView>(Resource.Id.ivHome);
                ResponseHomeImage = MainContext.FindViewById <ImageView>(Resource.Id.ivResponseHome);
                NotificationImage = MainContext.FindViewById <ImageView>(Resource.Id.ivNotification);
                ProfileImage      = MainContext.FindViewById <ImageView>(Resource.Id.ivProfile);
                TrendImage        = MainContext.FindViewById <ImageView>(Resource.Id.ivTrend);
                BlogImage         = MainContext.FindViewById <ImageView>(Resource.Id.ivBlog);
                txtUnSeenCount    = MainContext.FindViewById <TextView>(Resource.Id.txtUnSeenCount);

                HomeButton.SetOnClickListener(this);
                ResponseHomeButton.SetOnClickListener(this);
                TrendButton.SetOnClickListener(this);

                if (UserDetails.IsLogin)
                {
                    if (AppSettings.ShowArticle)
                    {
                        BlogButton.SetOnClickListener(this);
                    }

                    NotificationButton.SetOnClickListener(this);
                    ProfileButton.SetOnClickListener(this);
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Esempio n. 4
0
        private void Initialize()
        {
            try
            {
                MainLayout = MainContext.FindViewById <LinearLayout>(Resource.Id.llMain);

                CustomButton0 = MainContext.FindViewById <FrameLayout>(Resource.Id.llcustom0);
                CustomButton2 = MainContext.FindViewById <FrameLayout>(Resource.Id.llcustom2);
                CustomButton3 = MainContext.FindViewById <FrameLayout>(Resource.Id.llcustom3);
                CustomButton4 = MainContext.FindViewById <FrameLayout>(Resource.Id.llcustom4);
                CustomButton5 = MainContext.FindViewById <FrameLayout>(Resource.Id.llcustom5);

                CustomImage0 = MainContext.FindViewById <ImageView>(Resource.Id.ivcustom0);
                CustomImage2 = MainContext.FindViewById <ImageView>(Resource.Id.ivcustom2);
                CustomImage3 = MainContext.FindViewById <ImageView>(Resource.Id.ivcustom3);
                CustomImage4 = MainContext.FindViewById <ImageView>(Resource.Id.ivcustom4);
                CustomImage5 = MainContext.FindViewById <ImageView>(Resource.Id.ivcustom5);

                if (!UserDetails.IsLogin)
                {
                    CustomImage4.Visibility = ViewStates.Gone;
                    CustomImage5.Visibility = ViewStates.Gone;
                    MainLayout.WeightSum    = 3;
                }

                CustomButton0?.SetOnClickListener(this);
                CustomButton2?.SetOnClickListener(this);
                CustomButton3?.SetOnClickListener(this);
                CustomButton4?.SetOnClickListener(this);
                CustomButton5?.SetOnClickListener(this);

                CustomImage0.Background = null;
                CustomImage0.SetColorFilter(Color.ParseColor(AppSettings.MainColor));

                CustomImage2.Background = null;
                CustomImage2.SetColorFilter(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);

                CustomImage3.Background = null;
                CustomImage3.SetColorFilter(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);

                CustomImage4.Background = null;
                CustomImage4.SetColorFilter(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);

                CustomImage5.Background = null;
                CustomImage5.SetColorFilter(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        private void Initialize()
        {
            try
            {
                PlayerListener = new PlayerEvents(ActivityContext, ControlView);

                if (ActivityName != "FullScreen")
                {
                    SimpleExoPlayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view);
                    SimpleExoPlayerView.SetControllerVisibilityListener(PlayerListener);
                    SimpleExoPlayerView.RequestFocus();

                    //Player initialize
                    ControlView    = SimpleExoPlayerView.FindViewById <PlayerControlView>(Resource.Id.exo_controller);
                    PlayerListener = new PlayerEvents(ActivityContext, ControlView);

                    MFullScreenIcon   = ControlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    MFullScreenButton = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);

                    MainVideoFrameLayout = ActivityContext.FindViewById <FrameLayout>(Resource.Id.root);
                    MainVideoFrameLayout.SetOnClickListener(this);

                    switch (MFullScreenButton.HasOnClickListeners)
                    {
                    case false:
                        MFullScreenButton.SetOnClickListener(this);
                        break;
                    }
                }
                else
                {
                    FullscreenPlayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view2);
                    ControlView          = FullscreenPlayerView.FindViewById <PlayerControlView>(Resource.Id.exo_controller);
                    PlayerListener       = new PlayerEvents(ActivityContext, ControlView);

                    MFullScreenIcon   = ControlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    MFullScreenButton = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);

                    switch (MFullScreenButton.HasOnClickListeners)
                    {
                    case false:
                        MFullScreenButton.SetOnClickListener(this);
                        break;
                    }
                }
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }
Esempio n. 6
0
            public void OnBindView(IDrawerItem p0, View p1)
            {
                p1.SetPadding(DimensionsHelper.DpToPx(16), 0, 0, 0);

                var frame = p1.FindViewById(123098);

                if (frame != null)
                {
                    if (p0.Tag != null)
                    {
                        frame.Visibility = ViewStates.Visible;
                    }
                    else
                    {
                        frame.Visibility = ViewStates.Gone;
                    }

                    frame.SetOnClickListener(new OnClickListener(_moreButtonAction));

                    return;
                }
                if (p0.Tag == null)
                {
                    return;
                }

                var param = new LinearLayout.LayoutParams(DimensionsHelper.DpToPx(50), -1);

                param.SetMargins(DimensionsHelper.DpToPx(10), 0, 0, 0);

                var view = new FrameLayout(p1.Context)
                {
                    Clickable        = true,
                    Focusable        = true,
                    Id               = 123098,
                    LayoutParameters = param
                };

                view.SetBackgroundResource(ResourceExtension.SelectableBorderlessItemBackground);
                var img = new ImageView(p1.Context);

                img.SetScaleType(ImageView.ScaleType.Center);
                img.SetImageResource(Resource.Drawable.icon_more_vertical);
                img.ImageTintList = global::Android.Content.Res.ColorStateList.ValueOf(new Color(ResourceExtension.BrushText));

                view.AddView(img);

                view.SetOnClickListener(new OnClickListener(_moreButtonAction));

                (p1 as ViewGroup).AddView(view);
            }
        private FrameLayout InitializeCroutonViewGroup(Resources resources)
        {
            var croutonView = new FrameLayout(Activity);

            if (null != OnClickListener)
            {
                croutonView.SetOnClickListener(OnClickListener);
            }

            int height;

            if (Style.HeightDimensionResId > 0)
            {
                height = resources.GetDimensionPixelSize(Style.HeightDimensionResId);
            }
            else
            {
                height = Style.HeightInPixels;
            }

            int width;

            if (Style.WidthDimensionResId > 0)
            {
                width = resources.GetDimensionPixelSize(Style.WidthDimensionResId);
            }
            else
            {
                width = Style.WidthInPixels;
            }

            croutonView.LayoutParameters = new FrameLayout.LayoutParams(width != 0 ? width : ViewGroup.LayoutParams.MatchParent, height);

            //TODO: THIS WAS THE FIX
            croutonView.SetBackgroundColor(this.Style.BackgroundColor);

            // set the background drawable if set. This will override the background
            // color.
            if (Style.BackgroundDrawableResourceId != 0)
            {
                Bitmap background = BitmapFactory.DecodeResource(resources, Style.BackgroundDrawableResourceId);
                var    drawable   = new BitmapDrawable(resources, background);
                if (Style.IsTileEnabled)
                {
                    drawable.SetTileModeXY(Shader.TileMode.Repeat, Shader.TileMode.Repeat);
                }
                croutonView.SetBackgroundDrawable(drawable);
            }
            return(croutonView);
        }
Esempio n. 8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.activity_main);

            settings = PreferenceManager.GetDefaultSharedPreferences(this);
            editor   = settings.Edit();
            //editor.Clear().Commit();
            prefListener = new PrefListener(this);

            clickableFrameLayout = FindViewById <FrameLayout>(Resource.Id.clickableFrameLayout);

            currentAccentColor = AccentColors.GetIdFromResource(settings.GetString(ACCENT_COLOR_KEY, ACCENT_COLOR_DEFAULT));

            clickableFrameLayout.SetBackgroundColor(GetColor(currentAccentColor));
            clickableFrameLayout.SetOnClickListener(this);

            SetAmbientEnabled();
        }
        public override Dialog OnCreateDialog(Bundle savedInstanceState)
        {
            MaterialDialog dialog = (new MaterialDialog.Builder(Activity)).SetTitle(Resource.String.color_chooser).SetAutoDismiss(false).SetCustomView(Resource.Layout.dialog_color_chooser, false).Build();

            TypedArray ta = Activity.Resources.ObtainTypedArray(Resource.Array.colors);

            mColors = new Color[ta.Length()];
            for (int i = 0; i < ta.Length(); i++)
            {
                mColors[i] = ta.GetColor(i, 0);
            }
            ta.Recycle();
            GridLayout list      = (GridLayout)dialog.CustomView.FindViewById(Resource.Id.grid);
            int        preselect = Arguments.GetInt("preselect", -1);

            for (int i = 0; i < list.ChildCount; i++)
            {
                FrameLayout child = (FrameLayout)list.GetChildAt(i);
                child.Tag = i;
                child.SetOnClickListener(this);
                child.GetChildAt(0).Visibility = preselect == i ? ViewStates.Visible : ViewStates.Gone;

                Drawable selector = CreateSelector(mColors[i]);
                if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
                {
                    int[][]        states       = new int[][] { new int[] { -Android.Resource.Attribute.StatePressed }, new int[] { Android.Resource.Attribute.StatePressed } };
                    int[]          colors       = new int[] { ShiftColor(mColors[i]), mColors[i] };
                    ColorStateList rippleColors = new ColorStateList(states, colors);
                    SetBackgroundCompat(child, new RippleDrawable(rippleColors, selector, null));
                }
                else
                {
                    SetBackgroundCompat(child, selector);
                }
            }
            return(dialog);
        }
Esempio n. 10
0
        private void Initialize()
        {
            try
            {
                if (ActivityName != "FullScreen")
                {
                    SimpleExoPlayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view);
                    ControlView         = SimpleExoPlayerView.FindViewById <PlayerControlView>(Resource.Id.exo_controller);
                    PlayerListener      = new PlayerEvents(this, ActivityContext, ControlView);
                    SimpleExoPlayerView.SetControllerVisibilityListener(PlayerListener);
                    SimpleExoPlayerView.RequestFocus();
                    //Player initialize
                    ExoTopLayout         = ControlView.FindViewById <LinearLayout>(Resource.Id.topLayout);
                    ExoBackButton        = ControlView.FindViewById <ImageView>(Resource.Id.BackIcon);
                    DownloadIcon         = ControlView.FindViewById <ImageView>(Resource.Id.Download_icon);
                    MFullScreenIcon      = ControlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    MFullScreenButton    = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);
                    ShareIcon            = ControlView.FindViewById <ImageView>(Resource.Id.share_icon);
                    MenueButton          = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_menue_button);
                    MainVideoFrameLayout = ActivityContext.FindViewById <FrameLayout>(Resource.Id.root);
                    MainRoot             = ActivityContext.FindViewById <FrameLayout>(Resource.Id.Mainroot);
                    ExoTopAds            = ControlView.FindViewById <LinearLayout>(Resource.Id.exo_top_ads);
                    ExoEventButton       = ControlView.FindViewById <LinearLayout>(Resource.Id.exo_event_buttons);
                    BtnSkipIntro         = ControlView.FindViewById <TextView>(Resource.Id.exo_skipIntro);

                    BtnSkipIntro.Visibility = ViewStates.Gone;
                    ExoTopAds.Visibility    = ViewStates.Gone;

                    //SimpleExoPlayerView.HideController();
                    //SimpleExoPlayerView.RequestDisallowInterceptTouchEvent(true);
                    //SimpleExoPlayerView.ControllerHideOnTouch = true;

                    MainVideoFrameLayout.SetOnClickListener(this);
                    LoadingProgressBar = ActivityContext.FindViewById <ProgressBar>(Resource.Id.progress_bar);

                    if (!MFullScreenButton.HasOnClickListeners)
                    {
                        MFullScreenButton.SetOnClickListener(this);
                    }

                    if (!ExoBackButton.HasOnClickListeners)
                    {
                        //ExoBackButton.Click += BackIcon_Click;
                        DownloadIcon.Click += Download_icon_Click;
                        ShareIcon.Click    += ShareIcon_Click;
                        MenueButton.Click  += Menu_button_Click;
                        BtnSkipIntro.Click += BtnSkipIntroOnClick;
                        ExoTopAds.Click    += ExoTopAdsOnClick;
                    }
                }
                else
                {
                    FullScreenPlayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view2);
                    ControlView          = FullScreenPlayerView.FindViewById <PlayerControlView>(Resource.Id.exo_controller);
                    PlayerListener       = new PlayerEvents(this, ActivityContext, ControlView);

                    ExoTopLayout      = ControlView.FindViewById <LinearLayout>(Resource.Id.topLayout);
                    ExoBackButton     = ControlView.FindViewById <ImageView>(Resource.Id.BackIcon);
                    DownloadIcon      = ControlView.FindViewById <ImageView>(Resource.Id.Download_icon);
                    MFullScreenIcon   = ControlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    MFullScreenButton = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);
                    ShareIcon         = ControlView.FindViewById <ImageView>(Resource.Id.share_icon);
                    MenueButton       = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_menue_button);
                    ExoTopAds         = ControlView.FindViewById <LinearLayout>(Resource.Id.exo_top_ads);
                    ExoEventButton    = ControlView.FindViewById <LinearLayout>(Resource.Id.exo_event_buttons);
                    BtnSkipIntro      = ControlView.FindViewById <TextView>(Resource.Id.exo_skipIntro);

                    BtnSkipIntro.Visibility = ViewStates.Gone;
                    ExoTopAds.Visibility    = ViewStates.Gone;

                    if (!MFullScreenButton.HasOnClickListeners)
                    {
                        MFullScreenButton.SetOnClickListener(this);
                    }

                    if (!ExoBackButton.HasOnClickListeners)
                    {
                        ExoBackButton.Click += BackIcon_Click;
                        DownloadIcon.Click  += Download_icon_Click;
                        ShareIcon.Click     += ShareIcon_Click;
                        MenueButton.Click   += Menu_button_Click;
                        BtnSkipIntro.Click  += BtnSkipIntroOnClick;
                        ExoTopAds.Click     += ExoTopAdsOnClick;
                    }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Esempio n. 11
0
        public void Initialize()
        {
            try
            {
                PlayerLitsener = new Player_Events(ActivityContext, controlView);

                if (ActivityName != "FullScreen")
                {
                    simpleExoPlayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view);
                    simpleExoPlayerView.SetControllerVisibilityListener(PlayerLitsener);
                    simpleExoPlayerView.RequestFocus();

                    //Player initialize
                    controlView    = simpleExoPlayerView.FindViewById <PlaybackControlView>(Resource.Id.exo_controller);
                    PlayerLitsener = new Player_Events(ActivityContext, controlView);

                    Exo_topLayout     = controlView.FindViewById <LinearLayout>(Resource.Id.topLayout);
                    Exo_back_button   = controlView.FindViewById <ImageView>(Resource.Id.backIcon);
                    Download_icon     = controlView.FindViewById <ImageView>(Resource.Id.Download_icon);
                    mFullScreenIcon   = controlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    mFullScreenButton = controlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);
                    ShareIcon         = controlView.FindViewById <ImageView>(Resource.Id.share_icon);
                    Menue_button      = controlView.FindViewById <FrameLayout>(Resource.Id.exo_menue_button);
                    videoPlayButton   = controlView.FindViewById <ImageButton>(Resource.Id.exo_play);
                    videoResumeButton = controlView.FindViewById <ImageButton>(Resource.Id.exo_pause);

                    MainvideoFrameLayout = ActivityContext.FindViewById <FrameLayout>(Resource.Id.root);
                    MainvideoFrameLayout.SetOnClickListener(this);

                    Loadingprogress_bar = ActivityContext.FindViewById <ProgressBar>(Resource.Id.progress_bar);

                    QualityiconView             = ActivityContext.FindViewById <TextView>(Resource.Id.Qualityicon);
                    ViewsiconView               = ActivityContext.FindViewById <TextView>(Resource.Id.Viewsicon);
                    ShareiconView               = ActivityContext.FindViewById <TextView>(Resource.Id.Shareicon);
                    MoreiconView                = ActivityContext.FindViewById <TextView>(Resource.Id.Moreicon);
                    ShowMoreDiscriptioniconView = ActivityContext.FindViewById <TextView>(Resource.Id.video_ShowDiscription);
                    videoDescriptionLayout      = ActivityContext.FindViewById <LinearLayout>(Resource.Id.videoDescriptionLayout);


                    Share_Button        = ActivityContext.FindViewById <LinearLayout>(Resource.Id.ShareButton);
                    Share_Button.Click += ShareIcon_Click;

                    More_Button        = ActivityContext.FindViewById <LinearLayout>(Resource.Id.moreButton);
                    More_Button.Click += MoreButton_OnClick;

                    Video_Titile           = ActivityContext.FindViewById <TextView>(Resource.Id.video_Titile);
                    Video_QualityTextView  = ActivityContext.FindViewById <TextView>(Resource.Id.QualityTextView);
                    Video_ViewsNumber      = ActivityContext.FindViewById <TextView>(Resource.Id.ViewsNumber);
                    Video_videoDate        = ActivityContext.FindViewById <TextView>(Resource.Id.videoDate);
                    Video_videoDescription = ActivityContext.FindViewById <AutoLinkTextView>(Resource.Id.videoDescriptionTextview);
                    Video_videoCategory    = ActivityContext.FindViewById <TextView>(Resource.Id.videoCategorytextview);

                    Video_Stars = ActivityContext.FindViewById <TextView>(Resource.Id.videoStarstextview);
                    Video_Tag   = ActivityContext.FindViewById <TextView>(Resource.Id.videoTagtextview);

                    TextSanitizerAutoLink = new TextSanitizer(Video_videoDescription, ActivityContext);

                    IMethods.Set_TextViewIcon("1", QualityiconView, IonIcons_Fonts.RibbonA);
                    IMethods.Set_TextViewIcon("1", ViewsiconView, IonIcons_Fonts.Eye);
                    IMethods.Set_TextViewIcon("1", ShareiconView, IonIcons_Fonts.ReplyAll);
                    IMethods.Set_TextViewIcon("1", MoreiconView, IonIcons_Fonts.PlusCircled);
                    IMethods.Set_TextViewIcon("1", ShowMoreDiscriptioniconView, IonIcons_Fonts.ArrowDownB);

                    ShowMoreDiscriptioniconView.Visibility = ViewStates.Gone;

                    videoDescriptionLayout.Visibility = ViewStates.Visible;

                    if (!mFullScreenButton.HasOnClickListeners)
                    {
                        mFullScreenButton.SetOnClickListener(this);
                    }

                    if (!Exo_back_button.HasOnClickListeners)
                    {
                        Exo_back_button.Click += BackIcon_Click;
                        Download_icon.Click   += Download_icon_Click;
                        ShareIcon.Click       += ShareIcon_Click;
                        //Menue_button.Click += Menue_button_Click;

                        Menue_button.Visibility = ViewStates.Gone;
                    }
                }
                else
                {
                    FullscreenplayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view2);
                    controlView          = FullscreenplayerView.FindViewById <PlaybackControlView>(Resource.Id.exo_controller);
                    PlayerLitsener       = new Player_Events(ActivityContext, controlView);

                    Exo_topLayout     = controlView.FindViewById <LinearLayout>(Resource.Id.topLayout);
                    Exo_back_button   = controlView.FindViewById <ImageView>(Resource.Id.backIcon);
                    Download_icon     = controlView.FindViewById <ImageView>(Resource.Id.Download_icon);
                    mFullScreenIcon   = controlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    mFullScreenButton = controlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);
                    ShareIcon         = controlView.FindViewById <ImageView>(Resource.Id.share_icon);
                    Menue_button      = controlView.FindViewById <FrameLayout>(Resource.Id.exo_menue_button);
                    videoPlayButton   = controlView.FindViewById <ImageButton>(Resource.Id.exo_play);
                    videoResumeButton = controlView.FindViewById <ImageButton>(Resource.Id.exo_pause);

                    if (!mFullScreenButton.HasOnClickListeners)
                    {
                        mFullScreenButton.SetOnClickListener(this);
                    }

                    if (!Exo_back_button.HasOnClickListeners)
                    {
                        Exo_back_button.Click += BackIcon_Click;
                        Download_icon.Click   += Download_icon_Click;
                        ShareIcon.Click       += ShareIcon_Click;
                        //Menue_button.Click += Menue_button_Click;

                        Menue_button.Visibility = ViewStates.Gone;
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
Esempio n. 12
0
        public void Initialize()
        {
            try
            {
                PlayerListener = new PlayerEvents(ActivityContext, ControlView);

                if (ActivityName != "FullScreen")
                {
                    SimpleExoPlayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view);
                    SimpleExoPlayerView.SetControllerVisibilityListener(PlayerListener);
                    SimpleExoPlayerView.RequestFocus();

                    //Player initialize
                    ControlView    = SimpleExoPlayerView.FindViewById <PlayerControlView>(Resource.Id.exo_controller);
                    PlayerListener = new PlayerEvents(ActivityContext, ControlView);

                    FullScreenIcon    = ControlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    FullScreenButton  = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);
                    VideoPlayButton   = ControlView.FindViewById <ImageButton>(Resource.Id.exo_play);
                    VideoResumeButton = ControlView.FindViewById <ImageButton>(Resource.Id.exo_pause);

                    MainVideoFrameLayout = ActivityContext.FindViewById <FrameLayout>(Resource.Id.root);
                    MainVideoFrameLayout.SetOnClickListener(this);

                    LoadingProgressBar = ActivityContext.FindViewById <ProgressBar>(Resource.Id.progress_bar);

                    if (!AppSettings.ShowFullScreenVideoPost)
                    {
                        FullScreenIcon.Visibility   = ViewStates.Gone;
                        FullScreenButton.Visibility = ViewStates.Gone;
                    }
                    else
                    {
                        if (!FullScreenButton.HasOnClickListeners)
                        {
                            FullScreenButton.SetOnClickListener(this);
                        }
                    }
                }
                else
                {
                    FullScreenPlayerView = ActivityContext.FindViewById <PlayerView>(Resource.Id.player_view2);
                    ControlView          = FullScreenPlayerView.FindViewById <PlayerControlView>(Resource.Id.exo_controller);
                    PlayerListener       = new PlayerEvents(ActivityContext, ControlView);

                    FullScreenIcon    = ControlView.FindViewById <ImageView>(Resource.Id.exo_fullscreen_icon);
                    FullScreenButton  = ControlView.FindViewById <FrameLayout>(Resource.Id.exo_fullscreen_button);
                    VideoPlayButton   = ControlView.FindViewById <ImageButton>(Resource.Id.exo_play);
                    VideoResumeButton = ControlView.FindViewById <ImageButton>(Resource.Id.exo_pause);

                    if (!AppSettings.ShowFullScreenVideoPost)
                    {
                        FullScreenIcon.Visibility   = ViewStates.Gone;
                        FullScreenButton.Visibility = ViewStates.Gone;
                    }
                    else
                    {
                        if (!FullScreenButton.HasOnClickListeners)
                        {
                            FullScreenButton.SetOnClickListener(this);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }