public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.User_Timeline_Fragment, container, false);

            HybirdView = (WebView)view.FindViewById(Resource.Id.hybirdview);

            var hybridController = new HybirdViewController(Activity, HybirdView, null);

            hybridController.LoadUrl(Client.WebsiteUrl + "/app_api.php?application=phone&type=set_c&c=9860088665e4c26a03d7efc3bdca2e61ac134710a8b033e0c059833bc1355aea5ca2be7d47128206fce34b6aef091b6fb2032870279690f8");


            //hybridController.JavascriptInterface.OnJavascriptInjectionRequest += OnJavascriptInjectionRequest;
            hybridController.DefaultClient.OnPageEventFinished += WoDefaultClient_OnPageEventFinished;

            return(view);
        }
Example #2
0
        public void HyberdPostViewer_Load()
        {
            try
            {
                if (!IMethods.CheckConnectivity())
                {
                    HybirdView.Visibility = ViewStates.Gone;
                    News_Empty.Visibility = ViewStates.Visible;

                    swipeRefreshLayout.Refreshing = false;

                    Txt_News_Empty.Text = GetText(Resource.String.Lbl_Empty_News);
                    Txt_News_start.Text = GetText(Resource.String.Lbl_CheckYourInternetConnection);
                }
                else
                {
                    HybirdView.Visibility = ViewStates.Visible;
                    News_Empty.Visibility = ViewStates.Gone;

                    HybridController = new HybirdViewController(this, HybirdView);

                    switch (PageType)
                    {
                    case "User":
                    case "MyProfile":
                        Url = Current.URLS.UrlInstance.API_Get_News_Feed + Id;
                        break;

                    case "Saved Post":
                        Url = Current.URLS.UrlInstance.API_Get_News_Feed_SavedPost;
                        break;

                    case "Page":
                        Url = Current.URLS.UrlInstance.API_Get_News_Feed_Page + Id;
                        break;

                    case "Group":
                        Url = Current.URLS.UrlInstance.API_Get_News_Feed_Group + Id;
                        break;

                    case "Hashtag":
                        Url = Current.URLS.UrlInstance.API_Get_News_Feed_Hashtag + Id;
                        break;

                    case "Post":
                        Url = Current.URLS.UrlInstance.API_Get_News_Feed_Post + Id;
                        break;

                    case "Viewed":
                    case "Article":
                        Url = Id;
                        break;

                    case "Event":
                        Url = Current.URLS.UrlInstance.API_Get_News_Feed_Event + Id;
                        break;

                    default:
                        Url = Id;
                        break;
                    }

                    if (Settings.ClearCachSystem)
                    {
                        HybridController.HybirdView.ClearCache(true);
                    }

                    switch (Settings.Lang)
                    {
                    case "en":
                        HybridController.LoadUrl(Url + "&lang=english");
                        break;

                    case "ar":
                        HybridController.LoadUrl(Url + "&lang=arabic");
                        Settings.FlowDirection_RightToLeft = true;
                        break;

                    case "de":
                        HybridController.LoadUrl(Url + "&lang=german");
                        break;

                    case "el":
                        HybridController.LoadUrl(Url + "&lang=greek");
                        break;

                    case "es":
                        HybridController.LoadUrl(Url + "&lang=spanish");
                        break;

                    case "fr":
                        HybridController.LoadUrl(Url + "&lang=french");
                        break;

                    case "it":
                        HybridController.LoadUrl(Url + "&lang=italian");
                        break;

                    case "ja":
                        HybridController.LoadUrl(Url + "&lang=japanese");
                        break;

                    case "nl":
                        HybridController.LoadUrl(Url + "&lang=dutch");
                        break;

                    case "pt":
                        HybridController.LoadUrl(Url + "&lang=portuguese");
                        break;

                    case "ro":
                        HybridController.LoadUrl(Url + "&lang=romanian");
                        break;

                    case "ru":
                        HybridController.LoadUrl(Url + "&lang=russian");
                        break;

                    case "sq":
                        HybridController.LoadUrl(Url + "&lang=albanian");
                        break;

                    case "sr":
                        HybridController.LoadUrl(Url + "&lang=serbian");
                        break;

                    case "tr":
                        HybridController.LoadUrl(Url + "&lang=turkish");
                        break;

                    default:
                        HybridController.LoadUrl(Url);
                        break;
                    }
                }
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
                HyberdPostViewer_Load();
            }
        }
Example #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                var view = MyContextWrapper.GetContentView(Context, Settings.Lang, Resource.Layout.Tab_News_Feed_Layout);
                if (view == null)
                {
                    view = inflater.Inflate(Resource.Layout.Tab_News_Feed_Layout, container, false);
                }

                coordinatorLayout  = (CoordinatorLayout)view.FindViewById(Resource.Id.coordinator_Layout);
                StoryRecylerView   = (RecyclerView)view.FindViewById(Resource.Id.Recyler);
                HybirdView         = (WebView)view.FindViewById(Resource.Id.hybirdview);
                swipeRefreshLayout = (SwipeRefreshLayout)view.FindViewById(Resource.Id.swipeRefreshLayout);
                swipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight,
                                                           Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight,
                                                           Android.Resource.Color.HoloRedLight);
                swipeRefreshLayout.Refreshing = true;
                swipeRefreshLayout.Enabled    = true;

                ScrollView = (NestedScrollView)view.FindViewById(Resource.Id.scroll_View);

                Stories_Layout = (LinearLayout)view.FindViewById(Resource.Id.StoriesLayout);

                News_Empty     = (LinearLayout)view.FindViewById(Resource.Id.News_LinerEmpty);
                News_Icon      = (TextView)view.FindViewById(Resource.Id.News_icon);
                Txt_News_Empty = (TextView)view.FindViewById(Resource.Id.Txt_LabelEmpty);
                Txt_News_start = (TextView)view.FindViewById(Resource.Id.Txt_LabelStart);
                Btn_Reload     = (Button)view.FindViewById(Resource.Id.reloadPage_Button);
                IMethods.Set_TextViewIcon("2", News_Icon, "\uf119");
                News_Empty.Visibility = ViewStates.Gone;

                StoryRecylerView.SetLayoutManager(new LinearLayoutManager(Activity, LinearLayoutManager.Horizontal,
                                                                          false));
                StoryAdapter = new StoryAdapter(Activity);
                StoryRecylerView.SetAdapter(StoryAdapter);
                StoryRecylerView.NestedScrollingEnabled = false;

                if (!Settings.SetTabOnButton)
                {
                    var parasms = (CoordinatorLayout.LayoutParams)swipeRefreshLayout.LayoutParameters;
                    parasms.Gravity = (int)GravityFlags.Top;

                    // Check if we're running on Android 5.0 or higher
                    if ((int)Build.VERSION.SdkInt < 23)
                    {
                        parasms.TopMargin = 100;
                    }
                    else
                    {
                        parasms.TopMargin = 225;
                    }

                    swipeRefreshLayout.LayoutParameters = parasms;
                }

                HybridController = new HybirdViewController(Activity, HybirdView);

                //Set WebView and Load url to be rendered on WebView
                if (!IMethods.CheckConnectivity())
                {
                    if (Settings.EnableCachSystem)
                    {
                        if (File.Exists(IMethods.IPath.FolderDiskPost + "news_feed.html"))
                        {
                            LoadCach = true;
                            HybridController.HybirdView.Settings.CacheMode = CacheModes.CacheElseNetwork;
                            var html = File.ReadAllText(IMethods.IPath.FolderDiskPost + "news_feed.html");
                            //HybridController.HybirdView.LoadData(html, "text/html", null);
                            HybridController.HybirdView.LoadDataWithBaseURL(WoWonder_API.Client.WebsiteUrl, html, "text/html", "utf-8", null);
                        }
                        else
                        {
                            HybirdView.Visibility         = ViewStates.Gone;
                            News_Empty.Visibility         = ViewStates.Visible;
                            swipeRefreshLayout.Refreshing = false;

                            Txt_News_Empty.Text = GetText(Resource.String.Lbl_Empty_News);
                            Txt_News_start.Text = GetText(Resource.String.Lbl_CheckYourInternetConnection);
                        }
                    }
                    else
                    {
                        HybirdView.Visibility         = ViewStates.Gone;
                        News_Empty.Visibility         = ViewStates.Visible;
                        swipeRefreshLayout.Refreshing = false;

                        Txt_News_Empty.Text = GetText(Resource.String.Lbl_Empty_News);
                        Txt_News_start.Text = GetText(Resource.String.Lbl_CheckYourInternetConnection);
                    }
                }
                else
                {
                    if (Settings.ClearCachSystem)
                    {
                        HybridController.HybirdView.ClearCache(true);
                    }

                    HybirdView.Visibility = ViewStates.Visible;
                    News_Empty.Visibility = ViewStates.Gone;

                    if (Settings.LoadCachedHybirdViewOnFirstLoad)
                    {
                        if (File.Exists(IMethods.IPath.FolderDiskPost + "news_feed.html"))
                        {
                            LoadCach = true;
                            var html = File.ReadAllText(IMethods.IPath.FolderDiskPost + "news_feed.html");
                            //HybridController.HybirdView.LoadData(html, "text/html", null);
                            HybridController.HybirdView.LoadDataWithBaseURL(WoWonder_API.Client.WebsiteUrl + "/get_news_feed", html, "text/html", "utf-8", null);
                        }
                        else
                        {
                            switch (Settings.Lang)
                            {
                            case "en":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=english" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "ar":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=arabic" + "&type=set_c&c=" + UserDetails.Cookie);
                                Settings.FlowDirection_RightToLeft = true;
                                break;

                            case "de":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=german" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "el":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=greek" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "es":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=spanish" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "fr":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=french" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "it":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=italian" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "ja":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=japanese" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "nl":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=dutch" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "pt":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=portuguese" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "ro":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=romanian" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "ru":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=russian" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "sq":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=albanian" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "sr":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=serbian" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            case "tr":
                                HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=turkish" + "&type=set_c&c=" + UserDetails.Cookie);
                                break;

                            default:
                                HybridController.LoadUrl(Current.URLS.UrlInstance.API_Get_News_Feed_Cookie + UserDetails.Cookie);
                                break;
                            }
                        }
                    }
                    else
                    {
                        switch (Settings.Lang)
                        {
                        case "en":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=english" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "ar":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=arabic" + "&type=set_c&c=" + UserDetails.Cookie);
                            Settings.FlowDirection_RightToLeft = true;
                            break;

                        case "de":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=german" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "el":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=greek" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "es":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=spanish" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "fr":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=french" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "it":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=italian" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "ja":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=japanese" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "nl":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=dutch" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "pt":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=portuguese" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "ro":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=romanian" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "ru":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=russian" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "sq":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=albanian" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "sr":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=serbian" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        case "tr":
                            HybridController.LoadUrl(WoWonder_API.Client.WebsiteUrl + "/app_api.php?application=phone" + "&lang=turkish" + "&type=set_c&c=" + UserDetails.Cookie);
                            break;

                        default:
                            HybridController.LoadUrl(Current.URLS.UrlInstance.API_Get_News_Feed_Cookie + UserDetails.Cookie);
                            break;
                        }
                    }
                }

                if (Settings.Show_Story)
                {
                    Stories_Layout.Visibility = ViewStates.Visible;
                    GetStory_Api();
                }
                else
                {
                    Stories_Layout.Visibility = ViewStates.Gone;
                    Get_Notifications();
                }

                return(view);
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
                return(null);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                if ((int)Build.VERSION.SdkInt >= 23)
                {
                    Window.AddFlags(WindowManagerFlags.LayoutNoLimits);
                    Window.AddFlags(WindowManagerFlags.TranslucentNavigation);
                }

                base.OnCreate(savedInstanceState);

                IMethods.IApp.FullScreenApp(this);
                var view = MyContextWrapper.GetContentView(this, Settings.Lang, Resource.Layout.EventView_Layout);
                if (view != null)
                {
                    SetContentView(view);
                }
                else
                {
                    SetContentView(Resource.Layout.EventView_Layout);
                }

                News_Empty     = (LinearLayout)FindViewById(Resource.Id.News_LinerEmpty);
                News_Icon      = (TextView)FindViewById(Resource.Id.News_icon);
                Txt_News_Empty = (TextView)FindViewById(Resource.Id.Txt_LabelEmpty);
                Txt_News_start = (TextView)FindViewById(Resource.Id.Txt_LabelStart);
                Btn_Reload     = (Button)FindViewById(Resource.Id.reloadPage_Button);
                IMethods.Set_TextViewIcon("2", News_Icon, "\uf119");
                News_Empty.Visibility = ViewStates.Gone;

                Txt_Name       = FindViewById <TextView>(Resource.Id.tvName_ptwo);
                IconGoing      = FindViewById <TextView>(Resource.Id.IconGoing);
                Txt_Going      = FindViewById <TextView>(Resource.Id.GoingTextview);
                IconInterested = FindViewById <TextView>(Resource.Id.IconInterested);
                Txt_Interested = FindViewById <TextView>(Resource.Id.InterestedTextview);
                Txt_StartDate  = FindViewById <TextView>(Resource.Id.txtStartDate);
                Txt_EndDate    = FindViewById <TextView>(Resource.Id.txtEndDate);

                IconLocation    = FindViewById <TextView>(Resource.Id.IconLocation);
                Txt_Location    = FindViewById <TextView>(Resource.Id.LocationTextview);
                Txt_Description = FindViewById <TextView>(Resource.Id.tv_aboutdescUser);

                HybirdView = (WebView)FindViewById(Resource.Id.hybirdview);

                ImageEventCover = FindViewById <ImageViewAsync>(Resource.Id.EventCover);
                IconBack        = FindViewById <ImageView>(Resource.Id.back);

                Btn_Go        = FindViewById <Button>(Resource.Id.ButtonGoing);
                Btn_Intersted = FindViewById <Button>(Resource.Id.ButtonIntersted);

                FloatingActionButtonView = FindViewById <FloatingActionButton>(Resource.Id.floatingActionButtonView);

                IMethods.Set_TextViewIcon("1", IconGoing, IonIcons_Fonts.IosPeople);
                IMethods.Set_TextViewIcon("1", IconInterested, IonIcons_Fonts.AndroidStar);
                IMethods.Set_TextViewIcon("1", IconLocation, IonIcons_Fonts.Location);

                var mapFragment = (MapFragment)FragmentManager.FindFragmentById(Resource.Id.map);
                mapFragment.GetMapAsync(this);

                //Set to event id to load the news feed
                HybridController = new HybirdViewController(this, HybirdView, null);

                Get_Data_Event();
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }
Example #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                IMethods.IApp.FullScreenApp(this);

                var view = MyContextWrapper.GetContentView(this, Settings.Lang, Resource.Layout.LocalWebView_layout);
                if (view != null)
                {
                    SetContentView(view);
                }
                else
                {
                    SetContentView(Resource.Layout.LocalWebView_layout);
                }

                var data = Intent.GetStringExtra("URL") ?? "Data not available";
                if (data != "Data not available" && !string.IsNullOrEmpty(data))
                {
                    Url = data;
                }
                var Type = Intent.GetStringExtra("Type") ?? "Data not available";
                if (Type != "Data not available" && !string.IsNullOrEmpty(Type))
                {
                    Type_Url = Type;
                }

                HybirdView         = FindViewById <WebView>(Resource.Id.LocalWebView);
                swipeRefreshLayout = (SwipeRefreshLayout)FindViewById(Resource.Id.swipeRefreshLayout);

                var ToolBar = FindViewById <Toolbar>(Resource.Id.toolbar);
                if (ToolBar != null)
                {
                    ToolBar.Title = Type_Url;

                    SetSupportActionBar(ToolBar);
                    SupportActionBar.SetDisplayShowCustomEnabled(true);
                    SupportActionBar.SetDisplayHomeAsUpEnabled(true);
                    SupportActionBar.SetHomeButtonEnabled(true);
                    SupportActionBar.SetDisplayShowHomeEnabled(true);
                }

                News_Empty     = (LinearLayout)FindViewById(Resource.Id.News_LinerEmpty);
                News_Icon      = (TextView)FindViewById(Resource.Id.News_icon);
                Txt_News_Empty = (TextView)FindViewById(Resource.Id.Txt_LabelEmpty);
                Txt_News_start = (TextView)FindViewById(Resource.Id.Txt_LabelStart);
                Btn_Reload     = (Button)FindViewById(Resource.Id.reloadPage_Button);
                IMethods.Set_TextViewIcon("2", News_Icon, "\uf119");
                News_Empty.Visibility = ViewStates.Gone;

                swipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight,
                                                           Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight,
                                                           Android.Resource.Color.HoloRedLight);
                swipeRefreshLayout.Refreshing = true;
                swipeRefreshLayout.Enabled    = true;

                //Set WebView and Load url to be rendered on WebView
                if (!IMethods.CheckConnectivity())
                {
                    HybirdView.Visibility = ViewStates.Gone;
                    News_Empty.Visibility = ViewStates.Visible;

                    swipeRefreshLayout.Refreshing = false;

                    Txt_News_Empty.Text = GetText(Resource.String.Lbl_Empty_News);
                    Txt_News_start.Text = GetText(Resource.String.Lbl_CheckYourInternetConnection);
                }
                else
                {
                    HybirdView.Visibility = ViewStates.Visible;
                    News_Empty.Visibility = ViewStates.Gone;

                    HybridController = new HybirdViewController(this, HybirdView);

                    if (Settings.ClearCachSystem)
                    {
                        HybridController.HybirdView.ClearCache(true);
                    }

                    if (Settings.FlowDirection_RightToLeft)
                    {
                        HybridController.LoadUrl(Url + "&lang=arabic");
                    }
                    else
                    {
                        HybridController.LoadUrl(Url);
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
Example #6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                IMethods.IApp.FullScreenApp(this);

                var view = MyContextWrapper.GetContentView(this, Settings.Lang,
                                                           Resource.Layout.Settings_SupportWebView_layout);
                if (view != null)
                {
                    SetContentView(view);
                }
                else
                {
                    SetContentView(Resource.Layout.Settings_SupportWebView_layout);
                }

                var data = Intent.GetStringExtra("URL") ?? "Data not available";
                if (data != "Data not available" && !string.IsNullOrEmpty(data))
                {
                    Url = data;
                }

                var Type = Intent.GetStringExtra("Type") ?? "Data not available";
                if (Type != "Data not available" && !string.IsNullOrEmpty(data))
                {
                    Type_Url = Type;
                }

                var ToolBar = FindViewById <Toolbar>(Resource.Id.toolbar);
                if (ToolBar != null)
                {
                    ToolBar.Title = Type_Url;

                    SetSupportActionBar(ToolBar);

                    SupportActionBar.SetDisplayShowCustomEnabled(true);
                    SupportActionBar.SetDisplayHomeAsUpEnabled(true);
                    SupportActionBar.SetHomeButtonEnabled(true);
                    SupportActionBar.SetDisplayShowHomeEnabled(true);
                }

                HybirdView         = FindViewById <WebView>(Resource.Id.SupportWebView);
                swipeRefreshLayout = (SwipeRefreshLayout)FindViewById(Resource.Id.swipeRefreshLayout);
                swipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight,
                                                           Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight,
                                                           Android.Resource.Color.HoloRedLight);

                Support_Empty     = FindViewById <LinearLayout>(Resource.Id.Support_LinerEmpty);
                Support_Emptyicon = FindViewById <TextView>(Resource.Id.Support_icon);
                Txt_News_Empty    = (TextView)FindViewById(Resource.Id.Txt_LabelEmpty);
                Txt_News_start    = (TextView)FindViewById(Resource.Id.Txt_LabelStart);
                Btn_Reload        = (Button)FindViewById(Resource.Id.reloadPage_Button);
                IMethods.Set_TextViewIcon("2", Support_Emptyicon, "\uf119");
                Support_Empty.Visibility = ViewStates.Gone;

                IMethods.Set_TextViewIcon("1", Support_Emptyicon, IonIcons_Fonts.Videocamera);
                Support_Emptyicon.SetTextColor(Color.ParseColor(Settings.MainColor));

                //Set WebView and Load url to be rendered on WebView
                HybridController = new HybirdViewController(this, HybirdView);

                if (!IMethods.CheckConnectivity())
                {
                    Toast.MakeText(this, GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short)
                    .Show();

                    HybirdView.Visibility    = ViewStates.Gone;
                    Support_Empty.Visibility = ViewStates.Visible;
                }
                else
                {
                    HybirdView.Visibility    = ViewStates.Visible;
                    Support_Empty.Visibility = ViewStates.Gone;

                    swipeRefreshLayout.Refreshing = true;
                    swipeRefreshLayout.Enabled    = true;

                    if (Settings.ClearCachSystem)
                    {
                        HybridController.HybirdView.ClearCache(true);
                    }


                    switch (Settings.Lang)
                    {
                    case "en":
                        HybridController.LoadUrl(Url + "&lang=english");
                        break;

                    case "ar":
                        HybridController.LoadUrl(Url + "&lang=arabic");
                        Settings.FlowDirection_RightToLeft = true;
                        break;

                    case "de":
                        HybridController.LoadUrl(Url + "&lang=german");
                        break;

                    case "el":
                        HybridController.LoadUrl(Url + "&lang=greek");
                        break;

                    case "es":
                        HybridController.LoadUrl(Url + "&lang=spanish");
                        break;

                    case "fr":
                        HybridController.LoadUrl(Url + "&lang=french");
                        break;

                    case "it":
                        HybridController.LoadUrl(Url + "&lang=italian");
                        break;

                    case "ja":
                        HybridController.LoadUrl(Url + "&lang=japanese");
                        break;

                    case "nl":
                        HybridController.LoadUrl(Url + "&lang=dutch");
                        break;

                    case "pt":
                        HybridController.LoadUrl(Url + "&lang=portuguese");
                        break;

                    case "ro":
                        HybridController.LoadUrl(Url + "&lang=romanian");
                        break;

                    case "ru":
                        HybridController.LoadUrl(Url + "&lang=russian");
                        break;

                    case "sq":
                        HybridController.LoadUrl(Url + "&lang=albanian");
                        break;

                    case "sr":
                        HybridController.LoadUrl(Url + "&lang=serbian");
                        break;

                    case "tr":
                        HybridController.LoadUrl(Url + "&lang=turkish");
                        break;

                    default:
                        HybridController.LoadUrl(Url);
                        break;
                    }
                }
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }