示例#1
0
 public void FillTexCoords(GameObject planet)
 {
     foreach (WeatherVoxel Wv in voxels)
     {
         Wv.Set_TexCoord(planet);
     }
 }
 public void WebViewGoBack()
 {
     if (Wv.CanGoBack())
     {
         Wv.GoBack();
     }
     // BitChute.Web.ViewClients.RunBaseCommands(Wv, 2000);
 }
        /// <summary>
        /// we have to set this with a delay or it won't fix the link overflow
        /// </summary>
        public async void HideLinkOverflow()
        {
            await Task.Delay(AppSettings.LinkOverflowFixDelay);

            Wv.LoadUrl(JavascriptCommands._jsLinkFixer);
            Wv.LoadUrl(JavascriptCommands._jsDisableTooltips);
            Wv.LoadUrl(JavascriptCommands._jsHideTooltips);
        }
 private async void ExpandFeaturedChannels(bool delayed)
 {
     if (delayed)
     {
         await Task.Delay(3000);
     }
     Wv.LoadUrl(JavascriptCommands._jsFeaturedRemoveMaxWidth);
     Wv.LoadUrl(JavascriptCommands._jsExpandFeatured);
 }
 public async void ExpandVideoCards(bool delayed)
 {
     if (delayed)
     {
         await Task.Delay(5000);
     }
     Wv.LoadUrl(JavascriptCommands._jsBorderBoxAll);
     Wv.LoadUrl(JavascriptCommands._jsRemoveMaxWidthAll);
 }
        private async void HideWatchLabel()
        {
            await Task.Delay(4000);

            if (Wv.Url != "https://www.bitchute.com/")
            {
                Wv.LoadUrl(JavascriptCommands._jsHideTabInner);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                if (FragmentContainerLayout == null)
                {
                    FragmentContainerLayout = inflater.Inflate(Resource.Layout.Tab1FragLayout, container, false);
                }
                if (TabFragmentRelativeLayout == null)
                {
                    TabFragmentRelativeLayout =
                        FragmentContainerLayout.FindViewById <RelativeLayout>(Resource.Id.tab1relativeLayout);
                }
                if (WebViewFragmentLayout == null)
                {
                    WebViewFragmentLayout = inflater.Inflate(Resource.Layout.Tab1WebView, container, false);
                }
                Wv = WebViewFragmentLayout.FindViewById <ServiceWebView>(Resource.Id.webView1Swapable);
                Wv.SetWebViewClient((Subs)WebViewClient);
                Wv.RootUrl = RootUrl;
                Wv.Settings.JavaScriptEnabled = true;
                Wv.Settings.MediaPlaybackRequiresUserGesture = false;
                Wv.Settings.DisplayZoomControls = false;
                if (AppSettings.ZoomControl)
                {
                    Wv.Settings.BuiltInZoomControls = true;
                    Wv.Settings.DisplayZoomControls = false;
                }
                GetFragmentById(this.Id, this, TabId);

                LoginLayout                           = inflater.Inflate(Resource.Layout.Login, container, false);
                LoginButton                           = LoginLayout.FindViewById <Button>(Resource.Id.loginButton);
                UserNameTextBox                       = LoginLayout.FindViewById <EditText>(Resource.Id.userNameEditText);
                PasswordTextBox                       = LoginLayout.FindViewById <EditText>(Resource.Id.passwordEditText);
                ContinueWithoutLoginButton            = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                RegisterNewAccountButton              = LoginLayout.FindViewById <Button>(Resource.Id.registerNewAccountButton);
                ForgotPasswordButton                  = LoginLayout.FindViewById <Button>(Resource.Id.forgotPasswordButton);
                ContinueWithoutLoginButton            = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                LoginErrorTextView                    = LoginLayout.FindViewById <TextView>(Resource.Id.loginFailedTextView);
                LoginButton.Click                    += LoginButton_OnClick;
                ForgotPasswordButton.Click           += ForgotPasswordButton_OnClick;
                ContinueWithoutLoginButton.Click     += ContinueWithoutLogin_OnClick;
                RegisterNewAccountButton.Click       += RegisterNewAccountButton_OnClick;
                ContinueWithoutLoginButton.Visibility = ViewStates.Gone;
            }
            catch { }
            try
            {
                if (AppState.UserIsLoggedIn)
                {
                    SwapFragView(false, true);
                }
            }
            catch { }
            return(FragmentContainerLayout);
        }
 /// <summary>
 /// one press refreshes the page; two presses pops back to the root
 /// </summary>
 public void Pop2Root()
 {
     if (WvRl)
     {
         Wv.Reload();
         WvRl = false;
     }
     else
     {
         Wv.LoadUrl(RootUrl);
     }
 }
        public async void HidePageTitle()
        {
            await Task.Delay(5000);

            if (Wv.Url != "https://www.bitchute.com/" && AppState.Display.Horizontal)
            {
                Wv.LoadUrl(JavascriptCommands._jsHideTitle);
                Wv.LoadUrl(JavascriptCommands._jsHideWatchTab);
                Wv.LoadUrl(JavascriptCommands._jsHidePageBar);
                Wv.LoadUrl(JavascriptCommands._jsPageBarDelete);
            }
        }
示例#10
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter != null)
     {
         var model = e.Parameter as MovieDetailPageViewModel;
         if (model != null)
         {
             Wv.Navigate(new System.Uri("http://m.wufazhuce.com/movie/" + model.Id));
             // ViewModel = model;
         }
     }
 }
示例#11
0
 public void OnSettingsChanged(List <object> settings)
 {
     if (AppSettings.ZoomControl)
     {
         Wv.Settings.BuiltInZoomControls = true;
         Wv.Settings.DisplayZoomControls = false;
     }
     else
     {
         Wv.Settings.BuiltInZoomControls = false;
     }
     if (AppSettings.Tab2Hide)
     {
         Wv.LoadUrl(JavascriptCommands._jsHideCarousel);
     }
     else
     {
         Wv.LoadUrl(JavascriptCommands._jsShowCarousel);
     }
 }
 public void OnSettingsChanged(List <object> settings)
 {
     Wv.Settings.SetSupportZoom(AppSettings.ZoomControl);
     if (!AppSettings.Tab0FeaturedOn)
     {
         Wv.LoadUrl(JavascriptCommands._jsHideCarousel);
     }
     else
     {
         Wv.LoadUrl(JavascriptCommands._jsShowCarousel);
     }
     if (AppSettings.ZoomControl)
     {
         Wv.Settings.BuiltInZoomControls = true;
     }
     else
     {
         Wv.Settings.BuiltInZoomControls = false;
     }
 }
示例#13
0
        private async void HideWatchLabel()
        {
            await Task.Delay(1000);

            Wv.LoadUrl(JavascriptCommands._jsHideTabInner);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                if (FragmentContainerLayout == null)
                {
                    ViewHelpers.Tab3.FragmentContainerLayout = inflater.Inflate(Resource.Layout.Tab3FragLayout, container, false);
                }
                if (WebViewFragmentLayout == null)
                {
                    ViewHelpers.Tab3.WebViewFragmentLayout = inflater.Inflate(Resource.Layout.Tab3WebView, container, false);
                }
                if (DownloaderLayout == null)
                {
                    ViewHelpers.Tab3.DownloaderLayout = inflater.Inflate(Resource.Layout.DownloaderLayout, container, false);
                }
                ViewHelpers.Tab3.TabFragmentLinearLayout  = (LinearLayout)ViewHelpers.Tab3.FragmentContainerLayout.FindViewById <LinearLayout>(Resource.Id.tab3LinearLayout);
                ViewHelpers.Tab3.DownloadButton           = ViewHelpers.Tab3.DownloaderLayout.FindViewById <Button>(Resource.Id.downloadButton);
                ViewHelpers.Tab3.DownloadLinkEditText     = ViewHelpers.Tab3.DownloaderLayout.FindViewById <EditText>(Resource.Id.downloadByUrlEditText);
                ViewHelpers.Tab3.DownloadFileNameEditText = ViewHelpers.Tab3.DownloaderLayout.FindViewById <EditText>(Resource.Id.downloadByUrlFileNameEditText);
                ViewHelpers.Tab3.DownloadProgressBar      = ViewHelpers.Tab3.DownloaderLayout.FindViewById <ProgressBar>(Resource.Id.downloadProgressBar);
                ViewHelpers.Tab3.DownloadProgressTextView = ViewHelpers.Tab3.DownloaderLayout.FindViewById <TextView>(Resource.Id.progressTextView);
                DownloaderLayout.FindViewById <Button>(Resource.Id.videoDownloaderDonationButton).Click += MakeADonationButton_OnClick;
                Wv                    = (ServiceWebView)ViewHelpers.Tab3.WebViewFragmentLayout.FindViewById <ServiceWebView>(Resource.Id.webView3Swapable);
                Wv.RootUrl            = RootUrl;
                ViewHelpers.Container = container;
                ViewHelpers.Tab3.TabFragmentLinearLayout.AddView(ViewHelpers.Tab3.WebViewFragmentLayout);
                ViewHelpers.Tab3.AutoFillVideoTitleText        = ViewHelpers.Tab3.DownloaderLayout.FindViewById <CheckBox>(Resource.Id.autoFillTitleCheckBox);
                ViewHelpers.Tab3.GetDownloadFilesButton        = ViewHelpers.Tab3.DownloaderLayout.FindViewById <Button>(Resource.Id.getVideoFileDownloadButton);
                ViewHelpers.Tab3.AutoFillVideoTitleText        = ViewHelpers.Tab3.DownloaderLayout.FindViewById <CheckBox>(Resource.Id.autoFillTitleCheckBox);
                ViewHelpers.Tab3.DownloadButton.Click         += VideoDownloader.VideoDownloadButton_OnClick;
                ViewHelpers.Tab3.GetDownloadFilesButton.Click += FileBrowser.FileBrowserButton_OnClick;
                ViewHelpers.Tab3.FileLayoutManager             = new Android.Support.V7.Widget.LinearLayoutManager(Android.App.Application.Context);
                ViewHelpers.Tab3.FileRecyclerView              = ViewHelpers.Tab3.DownloaderLayout.FindViewById <Android.Support.V7.Widget.RecyclerView>(Resource.Id.fileRecyclerView);
                ViewHelpers.Tab3.CancelDownloadButton          = ViewHelpers.Tab3.DownloaderLayout.FindViewById <Button>(Resource.Id.cancelDownloadButton);
                ViewHelpers.Tab3.CancelDownloadButton.Click   += VideoDownloader.CancelDownloadButton_OnClick;
                ViewHelpers.Main.DownloadFAB.Clickable         = true;
                ViewHelpers.Main.DownloadFAB.Click            += VideoDownloader.DownloadFAB_OnClick;
                //if (AppSettings.Tab3OverrideEnabled) { RootUrl = AppSettings.GetTabOverrideUrlPref("tab3overridestring"); }
                BitChute.Web.ViewClients.SetWebViewClientFromObject(Wv, Wvc);
                Wv.SetWebChromeClient(new ExtWebChromeClient.ExtendedChromeClient(MainActivity.Instance));
                Wv.Settings.MediaPlaybackRequiresUserGesture = false;
                Wv.Settings.DisplayZoomControls = false;
                Wv.Settings.JavaScriptEnabled   = true;


                if (AppSettings.ZoomControl)
                {
                    Wv.Settings.BuiltInZoomControls = true;
                    Wv.Settings.DisplayZoomControls = false;
                }
                this.Id = new System.Random().Next(777);
                GetFragmentById(this.Id, this, TabId);
            }
            catch (Exception ex) { }
            try
            {
                LoginLayout                           = inflater.Inflate(Resource.Layout.Login, container, false);
                LoginButton                           = LoginLayout.FindViewById <Button>(Resource.Id.loginButton);
                UserNameTextBox                       = LoginLayout.FindViewById <EditText>(Resource.Id.userNameEditText);
                PasswordTextBox                       = LoginLayout.FindViewById <EditText>(Resource.Id.passwordEditText);
                ContinueWithoutLoginButton            = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                RegisterNewAccountButton              = LoginLayout.FindViewById <Button>(Resource.Id.registerNewAccountButton);
                ForgotPasswordButton                  = LoginLayout.FindViewById <Button>(Resource.Id.forgotPasswordButton);
                ContinueWithoutLoginButton            = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                LoginErrorTextView                    = LoginLayout.FindViewById <TextView>(Resource.Id.loginFailedTextView);
                LoginButton.Click                    += LoginButton_OnClick;
                ForgotPasswordButton.Click           += ForgotPasswordButton_OnClick;
                ContinueWithoutLoginButton.Click     += ContinueWithoutLogin_OnClick;
                RegisterNewAccountButton.Click       += RegisterNewAccountButton_OnClick;
                ContinueWithoutLoginButton.Visibility = ViewStates.Gone;
            }
            catch { }
            return(ViewHelpers.Tab3.TabFragmentLinearLayout);
        }
示例#15
0
        public async void LoadUrlWithDelay(string url, int delay)
        {
            await Task.Delay(delay);

            Wv.LoadUrl(url);
        }
示例#16
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            this.Id = new System.Random().Next(99999999);
            try
            {
                if (FragmentContainerLayout == null)
                {
                    FragmentContainerLayout = inflater.Inflate(Resource.Layout.Tab4FragLayout, container, false);
                }
                if (WebViewFragmentLayout == null)
                {
                    WebViewFragmentLayout = inflater.Inflate(Resource.Layout.Tab4WebView, container, false);
                }
                if (InternalTabbedLayout == null)
                {
                    InternalTabbedLayout = inflater.Inflate(Resource.Layout.InternalEncoderTabLayout, container, false);
                }
                if (SettingsTabLayout == null)
                {
                    SettingsTabLayout = inflater.Inflate(Resource.Layout.SettingsTabLayout, container, false);
                }
                if (InternalTabbedLayout != null)
                {
                    InternalTabbedLayout.FindViewById <Button>(Resource.Id.loginViewSwapButton)
                    .Click += LoginButtonShow_OnClick;
                    InternalTabbedLayout.FindViewById <Button>(Resource.Id.settingsViewSwapButton)
                    .Click += SettingsButton_OnClick;
                }
                TabFragmentLinearLayout = (LinearLayout)FragmentContainerLayout.FindViewById <LinearLayout>(Resource.Id.tab4LinearLayout);
                TabFragmentLinearLayout.RemoveAllViews();
                TabFragmentLinearLayout.AddView(ViewHelpers.Tab4.InternalTabbedLayout);
                Wv         = (ServiceWebView)WebViewFragmentLayout.FindViewById <ServiceWebView>(Resource.Id.webView4Swapable);
                Wv.RootUrl = RootUrl;
                BitChute.Web.ViewClients.SetWebViewClientFromObject(Wv, Wvc);
                Wv.SetWebChromeClient(new ExtendedChromeClient(MainActivity.Instance));
                Wv.Settings.JavaScriptEnabled   = true;
                Wv.Settings.DisplayZoomControls = false;
                Wv.Settings.MediaPlaybackRequiresUserGesture = false;

                if (VideoEncoderLayout == null)
                {
                    ViewHelpers.VideoEncoder.VideoEncoderLayout = inflater.Inflate(Resource.Layout.VideoEncodingLayout, container, false);
                }
                ViewHelpers.VideoEncoder.EncoderBitRateEditText = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <EditText>(Resource.Id.videoEncoderBitRateEditText);
                ViewHelpers.VideoEncoder.EncoderWidthEditText   = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <EditText>(Resource.Id.videoEncoderWidthEditText);
                ViewHelpers.VideoEncoder.EncoderHeightEditText  = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <EditText>(Resource.Id.videoEncoderHeightEditText);
                EncoderFpsEditText = VideoEncoderLayout.FindViewById <EditText>(Resource.Id.videoEncoderFpsEditText);
                ViewHelpers.VideoEncoder.StartEncodingButton         = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <Button>(Resource.Id.encodingStartButton);
                ViewHelpers.VideoEncoder.EncodingStatusTextView      = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <TextView>(Resource.Id.encoderStatusTextView);
                ViewHelpers.VideoEncoder.AudioEncodingStatusTextView = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <TextView>(Resource.Id.audioEncoderStatusTextView);
                ViewHelpers.VideoEncoder.StartEncodingButton.Click  += StartEncodingButton_OnClick;
                ViewHelpers.VideoEncoder.EncoderOutputFileEditText   = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <EditText>(Resource.Id.encoderOutputFileEditText);
                ViewHelpers.VideoEncoder.EncodeProgressBar           = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <ProgressBar>(Resource.Id.encoderProgressBar);
                ViewHelpers.VideoEncoder.AudioEncodeProgressBar      = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <ProgressBar>(Resource.Id.audioEncoderProgressBar);
                ViewHelpers.VideoEncoder.EncoderSourceEditText       = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <EditText>(Resource.Id.encoderSourceFileEditText);
                ViewHelpers.VideoEncoder.PickSourceButton            = ViewHelpers.VideoEncoder.VideoEncoderLayout.FindViewById <Button>(Resource.Id.encodingPickAVideoButton);
                ViewHelpers.VideoEncoder.PickSourceButton.Click     += EncoderSourceButton_OnClick;
                Tab4.ShowEncoderViewButton        = InternalTabbedLayout.FindViewById <Button>(Resource.Id.encoderViewSwapButton);
                Tab4.ShowWebViewButton            = InternalTabbedLayout.FindViewById <Button>(Resource.Id.webViewSwapButton);
                Tab4.ShowEncoderViewButton.Click += ShowEncoderView_OnClick;
                Tab4.ShowWebViewButton.Click     += ShowWebView_OnClick;
                ViewHelpers.Tab4.SettingsTabLayout.FindViewById <Button>(Resource.Id.goButton).Click += GoButton_OnClick;
                JavascriptInjectionTextBox = ViewHelpers.Tab4.SettingsTabLayout.FindViewById <EditText>(Resource.Id.javascriptDebugInjectionTextBox);
            }
            catch (Exception ex)
            {
            }
            try
            {
                EncoderFlexLinearLayout = InternalTabbedLayout.FindViewById <LinearLayout>(Resource.Id.encoderFlexLinearLayout);
                ViewHelpers.Tab4.EncoderFlexLinearLayout.AddView(WebViewFragmentLayout);
            }
            catch (Exception ex) { }
            try {
                AppSettings.Prefs      = Android.App.Application.Context.GetSharedPreferences("BitChute", FileCreationMode.Private);
                AppSettings.PrefEditor = AppSettings.Prefs.Edit();
                _zcoffrb             = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._zoomControlOffBtn);
                _zconrb              = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._zoomControlOnBtn);
                _fmoffrb             = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._zoomControlOffBtn);
                _fmonrb              = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._fanModeOnBtn);
                _t3hoffrb            = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._tab3HideOverrideOff);
                _t3honrb             = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._tab3HideOverrideOn);
                _t1foffrb            = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._tab1FeaturedCreatorsOff);
                _t1fonrb             = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._tab1FeaturedCreatorsOn);
                _stoverrideoffrb     = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._stOverrideOffRb);
                _stoverrideonrb      = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._stOverrideOnRb);
                _tab3OverrideSpinner = SettingsTabLayout.FindViewById <Spinner>(Resource.Id.tab4OverrideSpinner);
                _tab4OverrideSpinner = SettingsTabLayout.FindViewById <Spinner>(Resource.Id.tab5OverrideSpinner);
                _notificationonrb    = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._notificationsOnRb);
                _notificationoffrb   = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._notificationsOffRb);
            }
            catch (Exception ex) { }
            try {
                _hidehorizontalnavbaronrb        = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._hideNavBarHorizontalOn);
                _hidehorizontalnavbaroffrb       = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id._hideNavBarHorizontalOff);
                _hideverticalnavbaronrb          = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.verticalNavbarRbOn);
                _hideverticalnavbaroffrb         = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.verticalNavbarRbOff);
                _showdlbuttononpress             = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.showDlFabOnPress);
                _showdlbuttonalways              = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.alwaysShowDlFab);
                _showdlbuttonnever               = SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.dlFabOff);
                _versionTextView                 = SettingsTabLayout.FindViewById <TextView>(Resource.Id.versionTextView);
                _zcoffrb.CheckedChange          += ExtSettingChanged;
                _fmonrb.CheckedChange           += ExtSettingChanged;
                _fmonrb.CheckedChange           += OnFanModeRbCheckChanged;
                _t3hoffrb.CheckedChange         += ExtSettingChanged;
                _t1foffrb.CheckedChange         += ExtSettingChanged;
                _stoverrideonrb.CheckedChange   += ExtSettingChanged;
                _stoverrideonrb.CheckedChange   += OnSettingsRbCheckChanged;
                _notificationonrb.CheckedChange += ExtSettingChanged;

                _hidehorizontalnavbaronrb.CheckedChange += OnHorizontalNavbarRbChecked;
                _hideverticalnavbaronrb.CheckedChange   += OnVerticalNavbarRbChecked;
                _showdlbuttonalways.CheckedChange       += ExtSettingChanged;
                _showdlbuttonnever.CheckedChange        += ExtSettingChanged;
                _showdlbuttononpress.CheckedChange      += ExtSettingChanged;

                //Tab4.SearchOverrideSourceSpinner = _view.FindViewById<Spinner>(Resource.Id.searchOverrideSourceSpinner);
                //Tab4.SearchOverrideOffRb = _view.FindViewById<RadioButton>(Resource.Id.searchEngineOverrideOffRb);
                //Tab4.SearchOverrideOnRb = _view.FindViewById<RadioButton>(Resource.Id.searchEngineOverrideOnRb);
                //Tab4.SearchOverrideWithStaticBarRb = _view.FindViewById<RadioButton>(Resource.Id.searchEngineOverrideWithStaticBarRb);
                _tab3OverrideSpinner.ItemSelected += ExtSettingChanged;
                _tab3OverrideSpinner.ItemSelected += OnTab3OverrideSpinnerSelectionChanged;
                _tab4OverrideSpinner.ItemSelected += ExtSettingChanged;
                _tab4OverrideSpinner.ItemSelected += OnTab4OverrideSpinnerSelectionChanged;
                _tab3SpinOverrideAdapter           = new ArrayAdapter <string>(Android.App.Application.Context,
                                                                               Android.Resource.Layout.SimpleListItem1, _tabOverrideStringList);
                _tab3OverrideSpinner.Adapter = _tab3SpinOverrideAdapter;
                _tab4SpinOverrideAdapter     = new ArrayAdapter <string>(Android.App.Application.Context,
                                                                         Android.Resource.Layout.SimpleListItem1, _tabOverrideStringList);
                _tab4OverrideSpinner.Adapter = _tab4SpinOverrideAdapter;
                _versionTextView.Text        = AppState.AppVersion;

                if (AppSettings.ZoomControl)
                {
                    Wv.Settings.BuiltInZoomControls = true;
                    Wv.Settings.DisplayZoomControls = false;
                }
                if (AppSettings.Debug.LoadWebViewsOnStart)
                {
                    BitChute.Web.ViewClients.LoadInitialUrls();
                }
                GetFragmentById(this.Id, this, TabId);
            }
            catch (Exception ex) { }
            try
            {
                SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.autoPlayOnMinimize).Click     += ExtSettingChanged;
                SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.autoPlayFeedOnly).Click       += ExtSettingChanged;
                SettingsTabLayout.FindViewById <RadioButton>(Resource.Id.autoPlayOnMinimizeOff).Click  += ExtSettingChanged;
                SettingsTabLayout.FindViewById <Button>(Resource.Id.clearLoginCredentialsButton).Click += ClearLoginCredentialsButton_OnClick;
            }
            catch
            {
            }
            try
            {
                LoginLayout                           = inflater.Inflate(Resource.Layout.Login, container, false);
                LoginButton                           = LoginLayout.FindViewById <Button>(Resource.Id.loginButton);
                UserNameTextBox                       = LoginLayout.FindViewById <EditText>(Resource.Id.userNameEditText);
                PasswordTextBox                       = LoginLayout.FindViewById <EditText>(Resource.Id.passwordEditText);
                ContinueWithoutLoginButton            = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                RegisterNewAccountButton              = LoginLayout.FindViewById <Button>(Resource.Id.registerNewAccountButton);
                ForgotPasswordButton                  = LoginLayout.FindViewById <Button>(Resource.Id.forgotPasswordButton);
                ContinueWithoutLoginButton            = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                LoginErrorTextView                    = LoginLayout.FindViewById <TextView>(Resource.Id.loginFailedTextView);
                LoginButton.Click                    += LoginButton_OnClick;
                ForgotPasswordButton.Click           += ForgotPasswordButton_OnClick;
                ContinueWithoutLoginButton.Click     += ContinueWithoutLogin_OnClick;
                RegisterNewAccountButton.Click       += RegisterNewAccountButton_OnClick;
                ContinueWithoutLoginButton.Visibility = ViewStates.Gone;
            }
            catch
            {
            }
            return(FragmentContainerLayout);
        }
示例#17
0
 public void OnUserDeniedPreProcessing()
 {
     ShowWebViewButton.PerformClick();
     Wv.LoadUrl(JavascriptCommands.GetInjectable(JavascriptCommands.EnterUploadView));
 }
示例#18
0
        public void ForgotPasswordButton_OnClick(object sender, EventArgs e)
        {
            Wv.LoadUrl("https://www.bitchute.com/accounts/reset/");

            SwapFragView(true);
        }
示例#19
0
 public void RegisterNewAccountButton_OnClick(object sender, EventArgs e)
 {
     Wv.LoadUrl("https://www.bitchute.com/accounts/register/");
     SwapFragView(true);
 }
 public void LoadCustomUrl(string url)
 {
     Wv.LoadUrl(url);
 }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                if (ViewHelpers.Tab0.FragmentContainerLayout == null)
                {
                    ViewHelpers.Tab0.FragmentContainerLayout =
                        inflater.Inflate(Resource.Layout.Tab0FragLayout, container, false);
                }
                if (ViewHelpers.Tab0.TabFragmentRelativeLayout == null)
                {
                    ViewHelpers.Tab0.TabFragmentRelativeLayout =
                        ViewHelpers.Tab0.FragmentContainerLayout.FindViewById <RelativeLayout>(Resource.Id.tab0relativeLayout);
                }
                if (WebViewFragmentLayout == null)
                {
                    WebViewFragmentLayout = inflater.Inflate(Resource.Layout.Tab0WebView, container, false);
                }

                Wv = WebViewFragmentLayout.FindViewById <ServiceWebView>(Resource.Id.webView0Swapable);
                //Wv.LoadUrl("file:///android_asset/html/splash.html");
                Wv.RootUrl = RootUrl;
                Wv.SetWebViewClient((Home)WebViewClient);

                //LoginLayout = inflater.Inflate(Resource.Layout.Login, container, false);
                SetAutoPlayWithDelay(1);
                Wv.Settings.JavaScriptEnabled   = true;
                Wv.Settings.DisplayZoomControls = false;
                if (AppSettings.ZoomControl)
                {
                    Wv.Settings.BuiltInZoomControls = true;
                    Wv.Settings.DisplayZoomControls = false;
                }


                GetFragmentById(this.Id, this, TabId);
            }

            catch { }
            try
            {
                LoginLayout                       = inflater.Inflate(Resource.Layout.Login, container, false);
                LoginButton                       = LoginLayout.FindViewById <Button>(Resource.Id.loginButton);
                UserNameTextBox                   = LoginLayout.FindViewById <EditText>(Resource.Id.userNameEditText);
                PasswordTextBox                   = LoginLayout.FindViewById <EditText>(Resource.Id.passwordEditText);
                ContinueWithoutLoginButton        = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                RegisterNewAccountButton          = LoginLayout.FindViewById <Button>(Resource.Id.registerNewAccountButton);
                ForgotPasswordButton              = LoginLayout.FindViewById <Button>(Resource.Id.forgotPasswordButton);
                ContinueWithoutLoginButton        = LoginLayout.FindViewById <Button>(Resource.Id.continueWithoutLoginButton);
                LoginErrorTextView                = LoginLayout.FindViewById <TextView>(Resource.Id.loginFailedTextView);
                LoginButton.Click                += LoginButton_OnClick;
                ForgotPasswordButton.Click       += ForgotPasswordButton_OnClick;
                ContinueWithoutLoginButton.Click += ContinueWithoutLogin_OnClick;
                RegisterNewAccountButton.Click   += RegisterNewAccountButton_OnClick;
            }
            catch { }
            if (ShowLoginOnStartup)
            {
                //SwapMainActivityLoginView(true);
                SwapFragView();
            }
            else
            {
                SwapFragView(false, true);
            }
            return(ViewHelpers.Tab0.FragmentContainerLayout);
        }