Beispiel #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                IMethods.IApp.FullScreenApp(this);

                // Set our view from the "BlockedUsers_Layout" layout resource
                SetContentView(Resource.Layout.BlockedUsers_Layout);

                //Get values
                BlockedUsersRecyler = FindViewById <RecyclerView>(Resource.Id.BlockRecylerview);
                BlockedUsers_Empty  = FindViewById <LinearLayout>(Resource.Id.Block_LinerEmpty);
                swipeRefreshLayout  = FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout);
                Icon_blockedusers   = FindViewById <TextView>(Resource.Id.blockedusers_icon);

                BlockedUsersRecyler.Visibility = ViewStates.Visible;
                BlockedUsers_Empty.Visibility  = ViewStates.Gone;

                swipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight,
                                                           Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight,
                                                           Android.Resource.Color.HoloRedLight);
                IMethods.Set_TextViewIcon("2", Icon_blockedusers, "\uf235");
                Icon_blockedusers.SetTextColor(Android.Graphics.Color.ParseColor(AppSettings.MainColor));

                var ToolBar = FindViewById <Toolbar>(Resource.Id.Searchtoolbar);
                ToolBar.Title = this.GetText(Resource.String.Lbl_BlockedUsers);

                SetSupportActionBar(ToolBar);

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

                //Set Adapter
                mLayoutManager = new LinearLayoutManager(this);
                BlockedUsersRecyler.SetLayoutManager(mLayoutManager);
                mAdapter = new BlockedUsers_Adapter(this);
                BlockedUsersRecyler.SetAdapter(mAdapter);

                swipeRefreshLayout.Refreshing = true;
                swipeRefreshLayout.Enabled    = true;
                Get_BlockedList();

                AdsGoogle.Ad_Interstitial(this);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                IMethods.IApp.FullScreenApp(this);

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

                //Get values
                BlockedUsersRecyler = FindViewById <RecyclerView>(Resource.Id.BlockRecylerview);
                BlockedUsers_Empty  = FindViewById <LinearLayout>(Resource.Id.Block_LinerEmpty);
                swipeRefreshLayout  = FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout);
                Icon_blockedusers   = FindViewById <TextView>(Resource.Id.blockedusers_icon);

                BlockedUsersRecyler.Visibility = ViewStates.Visible;
                BlockedUsers_Empty.Visibility  = ViewStates.Gone;

                swipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight,
                                                           Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight,
                                                           Android.Resource.Color.HoloRedLight);
                IMethods.Set_TextViewIcon("2", Icon_blockedusers, "\uf235");
                Icon_blockedusers.SetTextColor(Color.ParseColor(Settings.MainColor));

                var ToolBar = FindViewById <Toolbar>(Resource.Id.Searchtoolbar);
                if (ToolBar != null)
                {
                    ToolBar.Title = GetString(Resource.String.Lbl_BlockedUsers);

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

                //Set Adapter
                mLayoutManager = new LinearLayoutManager(this);
                BlockedUsersRecyler.SetLayoutManager(mLayoutManager);
                mAdapter = new BlockedUsers_Adapter(this);
                BlockedUsersRecyler.SetAdapter(mAdapter);

                Get_BlockedList();

                //Show Ads
                AdsGoogle.Ad_RewardedVideo(this);
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }