protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.unauthenticated_main_activity);

            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.unAuthToolbar);

            SetSupportActionBar(toolbar);
            SupportActionBar.Title = "Somuleco";

            var fragments = new Android.Support.V4.App.Fragment[] {
                new LandingFragment(),
                new UnauthExploreFragment(),
                new UnauthLibraryFragment()
            };

            var titles = CharSequence.ArrayFromStringArray(new[] { "Landing", "Explore", "Library" });

            ViewPager viewPager = FindViewById <ViewPager>(Resource.Id.unauth_viewPager);
            var       tabLayout = FindViewById <TabLayout>(Resource.Id.unauthTabLayout);

            var adapter = new UnauthenticatedAdapter(SupportFragmentManager, fragments, titles);

            viewPager.Adapter = adapter;

            tabLayout.SetupWithViewPager(viewPager);
        }
        public override void OnStart()
        {
            try
            {
                base.OnStart();
                new GetEventRequestDetails(Activity, view, EventID).Execute();
                var fragments = new Fragment[]
                {
                    new PhotosFragment(),
                    new WeClipsFragment(),
                    new CommentsFragment()
                };

                viewPagerPWC.OffscreenPageLimit = 3;

                var titles = CharSequence.ArrayFromStringArray(new[]
                {
                    "Photos",
                    "WeClips",
                    "Comments"
                });
                viewPagerPWC.Focusable = false;
                tablayoutPWC.Focusable = false;
                viewPagerPWC.Adapter   = new EventPWCTabsAdapter(ChildFragmentManager, fragments, titles);
                tablayoutPWC.SetupWithViewPager(viewPagerPWC);
            }
            catch (System.Exception ex)
            {
                new CrashReportAsync("EventRequestFragment", "OnStart", ex.StackTrace + ex.Message).Execute();
            }
        }
Exemplo n.º 3
0
        void viepageratama()
        {
            var ss1 = new SeoktorFragment(this);
            var ss2 = new HizmetFragment(this);
            var ss3 = new KurumsalRenkFragment(this);
            var ss4 = new LogoFragment(this);

            //Fragment array
            fragments = new Android.Support.V4.App.Fragment[]
            {
                ss1,
                ss2,
                ss3,
                ss4,
            };
            //Tab title array
            var titles = CharSequence.ArrayFromStringArray(new[] {
                "s1",
                "s2",
                "s3",
                "s4",
            });

            try
            {
                viewpager.Adapter = new TabPagerAdaptor(this.SupportFragmentManager, fragments, titles);
            }
            catch
            {
            }
            viewpager.SetPageTransformer(true, new IntroTransformer(Transformiew));
        }
Exemplo n.º 4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            var fragments = new Android.Support.V4.App.Fragment[]
            {
                new TimeFragment(),
                new StopwatchFragment(),
                new AboutFragment()
            };

            var titles = CharSequence.ArrayFromStringArray(new []
            {
                "Time",
                "Stopwatch",
                "About"
            });

            //
            // TODO: Use FindViewById to get a reference to the ViewPager in the UI
            //



            //
            // TODO: Create a ClockAdapter
            //



            //
            // TODO: Assign the ClockAdapter to the ViewPager's Adapter property
            //
        }
Exemplo n.º 5
0
        public static void Construct(FragmentActivity activity, Toolbar toolbar)
        {
            TopMovieFragment topMovieFragment = new TopMovieFragment();
            var fragments = new Fragment[]
            {
                new MovieSearchFragment(),
                topMovieFragment
            };

            var titles = CharSequence.ArrayFromStringArray(new[]
            {
                "Search",
                "Top Rated"
            });

            var viewPager = activity.FindViewById <ViewPager>(Resource.Id.viewpager);

            viewPager.Adapter = new TabsFragmentPageAdapter(activity.SupportFragmentManager, fragments, titles);

            var tabLayout = activity.FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);
            viewPager.PageSelected += (sender, args) =>
            {
                if (args.Position == 1)
                {
                    topMovieFragment.GetTopMovies(activity);
                }
            };
            SetToolbar(activity, toolbar);
        }
Exemplo n.º 6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.tabs_activity);

            var toolBar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolBar);

            var fragments = new Fragment[]
            {
                fragment1,
                fragment2,
                fragment3,
            };

            var titles = CharSequence.ArrayFromStringArray(new[]
            {
                "Tab One",
                "Tab Two",
                "Tab Three"
            });

            var viewPager = FindViewById <ViewPager>(Resource.Id.viewPager);

            viewPager.Adapter = new TextTabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);

            var tabLayout = FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);
        }
Exemplo n.º 7
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            var fragments = new Android.Support.V4.App.Fragment[]
            {
                new TimeFragment(),
                new StopwatchFragment(),
                new AboutFragment()
            };

            var titles = CharSequence.ArrayFromStringArray(new []
            {
                "Time",
                "Stopwatch",
                "About"
            });

            viewPager         = FindViewById <ViewPager>(Resource.Id.viewPager);
            adapter           = new ClockAdapter(base.SupportFragmentManager, fragments, titles);
            viewPager.Adapter = adapter;

            //
            // TODO: Assign the ClockAdapter to the ViewPager's Adapter property
            //
        }
Exemplo n.º 8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            //initialize the toolbar
            SetSupportActionBar(Toolbar);

            var fragments = new Frag[]
            {
                new HelpFragment(),
                new UserSettingsFragment(),
            };

            var titles = CharSequence.ArrayFromStringArray(new[]
            {
                "People",
                "Films",
            });

            var viewPager = FindViewById <ViewPager>(Resource.Id.viewpager);

            viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);

            // Give the TabLayout the ViewPager
            var tabLayout = FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);
        }
Exemplo n.º 9
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            var fragments = new Fragment[]
            {
                new NameInputFragment(People),
                new OtherFragment(),
            };

            var titles = CharSequence.ArrayFromStringArray(new[] { "People", "Other" });

            var viewPager = FindViewById <ViewPager>(Resource.Id.viewpager);

            viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);

            var tabLayout = this.FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);

            var toolbar = this.FindViewById <Toolbar>(Resource.Id.toolbar);

            this.SetActionBar(toolbar);
            this.ActionBar.Title = "My Toolbar";
        }
Exemplo n.º 10
0
        public static void Construct(FragmentActivity activity, Toolbar toolbar)
        {
            _topRatedFragment = new OtherFragment();

            var fragments = new Fragment[]
            {
                new MovieInputFragment(),
                _topRatedFragment
            };
            var titles = CharSequence.ArrayFromStringArray(new[]
            {
                "Search",
                "Top Rated"
            });

            var viewPager = activity.FindViewById <ViewPager>(Resource.Id.viewpager);

            viewPager.Adapter = new TabsFragmentPagerAdapter(activity.SupportFragmentManager, fragments, titles);

            // Give the TabLayout the ViewPager
            var tabLayout = activity.FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);
            tabLayout.TabSelected += async(sender, args) =>
            {
                var tab = args.Tab;
                if (tab.Position == 1)
                {
                    await _topRatedFragment.FetchTopRatedMovies();
                }
            };
            SetToolbar(activity, toolbar);
        }
Exemplo n.º 11
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Main);

            var fragments = new Android.Support.V4.App.Fragment[]
            {
                new TimeFragment(),
                new StopwatchFragment(),
                new AboutFragment()
            };

            // TODO #5
            var titles = CharSequence.ArrayFromStringArray(new[] { "Time", "Stopwatch", "About" });

            var adapter = new ClockAdapter(base.SupportFragmentManager, fragments, titles);

            var viewPager = FindViewById <Android.Support.V4.View.ViewPager>(Resource.Id.viewPager);

            viewPager.Adapter = adapter;

            var tabLayout = FindViewById <Android.Support.Design.Widget.TabLayout>(Resource.Id.tabLayout);

            tabLayout.SetupWithViewPager(viewPager);

            // TODO #6
            tabLayout.GetTabAt(0).SetIcon(Resource.Drawable.ic_access_time_white_24dp);
            tabLayout.GetTabAt(1).SetIcon(Resource.Drawable.ic_timer_white_24dp);
            tabLayout.GetTabAt(2).SetIcon(Resource.Drawable.ic_info_outline_white_24dp);
        }
Exemplo n.º 12
0
        void FnInitTabLayout()
        {
            tabLayout.SetTabTextColors(Android.Graphics.Color.ParseColor("#11122E"), Android.Graphics.Color.ParseColor("#F05070"));
            Android.Support.V4.App.Fragment ss1, ss2, ss3, ss4, ss5;

            ss1 = new AnaSayfaBaseFragment();
            ss2 = new DenemeBaseFragment();
            ss3 = new TestCozBaseFragment();
            ss4 = new OyunBaseFragment();
            ss5 = new ProfileBaseFragment();

            //Fragment array
            var fragments = new Android.Support.V4.App.Fragment[]
            {
                ss1,
                ss2,
                ss3,
                ss4,
                ss5,
            };

            var titles = CharSequence.ArrayFromStringArray(new[] {
                "ANA SAYFA",
                "DENEME SINAVI",
                "TEST ÇÖZ",
                "OYUN",
                "MENU",
            });

            viewPager.Adapter = new TabPagerAdaptor(this.SupportFragmentManager, fragments, titles, true);

            tabLayout.SetupWithViewPager(viewPager);

            //((TextView)tabLayout.GetTabAt(0).CustomView).SetTextSize(Android.Util.ComplexUnitType.Dip, 8);
        }
Exemplo n.º 13
0
        void viepageratama()
        {
            var ss1 = new IntroFragment("Artık Testleri Tam Kalbinden", "VURMA ZAMANI", "Testbang’de eğitimde Hedefi yükseltme zamanı!\nİstediğin zaman, istediğin yerde\nistediğin konu ve seviyede soru çöz.", "testBang_02_Splash.json", false);
            var ss2 = new IntroFragment("Sınava Hazırlıkta Rekabet", "YENİ SEVİYEYE ULAŞTI", "Senin de dünyan artık dijitalse, eğitimde\nrekabeti artık internette yaşa.Seviyeni okuluna,\niline, ya da tüm Türkiye’ye karşı gör.", "testBang_03_Splash.json", false);
            var ss3 = new IntroFragment("Sınavların Sosyal Olma", "VAKTİ GELDİ", "İstersen arkadaşlarınla kapış, bilgini konuştur.\nİstersen Türkiye’nin dört bir yanındaki\nTestbang kullanıcılarıyla tanış ve yarış.", "testBang_04_Splash.json", true);

            //Fragment array
            fragments = new Android.Support.V4.App.Fragment[]
            {
                ss1,
                ss2,
                ss3,
            };
            //Tab title array
            var titles = CharSequence.ArrayFromStringArray(new[] {
                "s1",
                "s2",
                "s3",
            });

            try
            {
                viewpager.Adapter = new TabPagerAdaptor(this.SupportFragmentManager, fragments, titles);
            }
            catch
            {
            }
            viewpager.SetPageTransformer(true, new IntroTransformer(Transformiew));
        }
Exemplo n.º 14
0
        void viepageratama()
        {
            var ss1 = new IntroFragment("", "1. Aşama", "Öncelikle paylaşmak istediğin görsellerini contento’ya yükle ve görselin ne olduğuna dair küçük bir açıklama ekle ve sonrasını bize bırak!", "appintro_1.json", false);
            var ss2 = new IntroFragment("", "2. Aşama", "Sana bunları tamamen profesyonel bir şekilde; gönderiler, storyler, videolar, müzikli animasyonlar olarak hazırlayıp paylaşıma hazır hale getireceğiz.", "appintro2.json", false);
            var ss3 = new IntroFragment("", "Final!", "Sana sadece gönderilerini kontrol etmek kalacak.\nMükemmel değil mi!", "appintro_2.json", true);

            //Fragment array
            fragments = new Android.Support.V4.App.Fragment[]
            {
                ss1,
                ss2,
                ss3,
            };
            //Tab title array
            var titles = CharSequence.ArrayFromStringArray(new[] {
                "s1",
                "s2",
                "s3",
            });

            try
            {
                viewpager.Adapter = new TabPagerAdaptor(this.SupportFragmentManager, fragments, titles);
            }
            catch
            {
            }
            viewpager.SetPageTransformer(true, new IntroTransformer(Transformiew));
        }
Exemplo n.º 15
0
        void FnInitTabLayout()
        {
            tabLayout.SetTabTextColors(Android.Graphics.Color.Aqua, Android.Graphics.Color.AntiqueWhite);
            //Fragment array
            var fragments = new Android.Support.V4.App.Fragment[]
            {
                new BlueFragment(),
                new GreenFragment(),
                new YellowFragment(),
            };
            //Tab title array
            var titles = CharSequence.ArrayFromStringArray(new[] {
                "Blue",
                "Green",
                "Yellow",
            });

            var viewPager = FindViewById <ViewPager>(Resource.Id.viewpager);

            //viewpager holding fragment array and tab title text
            viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);

            // Give the TabLayout the ViewPager
            tabLayout.SetupWithViewPager(viewPager);
            //tabLayout.SetTabTextColors(
        }
Exemplo n.º 16
0
        void viepageratama()
        {
            var ss1 = new GoldAyricaliklarFragment("Daha çok kişiyle sohbet edin!", Resource.Mipmap.gold_icon1);
            var ss2 = new GoldAyricaliklarFragment("İsterseniz kimliğinizi gizleyin!", Resource.Mipmap.gold_icon2);
            var ss3 = new GoldAyricaliklarFragment("Her ay 3 Boost kazanın!", Resource.Mipmap.gold_icon3);
            var ss4 = new GoldAyricaliklarFragment("Her ay 3 Super Boost kazanın!", Resource.Mipmap.gold_icon5);
            var ss5 = new GoldAyricaliklarFragment("Anında 1000 Kredi kazanın!", Resource.Mipmap.gold_icon4);

            fragments = new Android.Support.V4.App.Fragment[]
            {
                ss1,
                ss2,
                ss3,
                ss4,
                ss5
            };
            var titles = CharSequence.ArrayFromStringArray(new[] {
                "s1",
                "s2",
                "s3",
                "s4",
                "s5"
            });

            try
            {
                _viewpageer.Adapter = new TabPagerAdaptor(ChildFragmentManager, fragments, titles);
                SetupViewPagerIndicator();
            }
            catch (Exception exx)
            {
                string asas = exx.Message;
            }
        }
Exemplo n.º 17
0
        /// <summary>
        /// The onCreate method for the main activity.
        /// </summary>
        /// <param name="bundle">The activity bundle.</param>
        protected override void OnCreate(Bundle bundle)
        {
            // Main view
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            // Fragments
            var fragments = new V4App.Fragment[]
            {
                new FirstPictureFragment(),
                new SecondPictureFragment(),
                new ResultsFragment(),
                new Model3DFragment()
            };

            // Titles
            var titles = CharSequence.ArrayFromStringArray(new[]
            {
                "Front Picture",
                "Side Picture",
                "Members weights",
                "3D Models"
            });

            // View pager and adapter
            var viewPager = FindViewById <V4View.ViewPager>(Resource.Id.bodyshapeViewPager);

            viewPager.Adapter = new MainAdapter(base.SupportFragmentManager, fragments, titles);
        }
Exemplo n.º 18
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            RequestWindowFeature(WindowFeatures.NoTitle);

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

            fragments = new Fragment[]
            {
                new TitleInputFragment(Movies),
                new TopRatedFragment()
            };

            var titles = CharSequence.ArrayFromStringArray(new[] { "Movies", "Top Rated" });

            var viewPager = FindViewById <ViewPager>(Resource.Id.viewpager);

            viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);
            var tabLayout = this.FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);


            viewPager.PageSelected += ViewPager_PageSelected;
            // Get our button from the layout resource,
            // and attach an event to it
            var toolbar = this.FindViewById <Toolbar>(Resource.Id.toolbar);

            this.SetActionBar(toolbar);
            this.ActionBar.Title = "Movie Search";
        }
Exemplo n.º 19
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.activity_mapa);

            var fragments = new Fragment[]
            {
                new MapaFragment(),
                new ListaFragment()
            };

            var titles = CharSequence.ArrayFromStringArray(new[]
            {
                "Mapa",
                "Lista"
            });

            var viewPager = FindViewById <ViewPager>(Resource.Id.viewpager);

            viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);

            // Give the TabLayout the ViewPager
            var tabLayout = FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);
        }
Exemplo n.º 20
0
        void FnInitTabLayout()
        {
            tabLayout.SetTabTextColors(Android.Graphics.Color.Aqua, Android.Graphics.Color.AntiqueWhite);
            //Fragment array
            var fragments = new Android.Support.V4.App.Fragment[]
            {
                new IconTextCallFragment(),

                new IconTextDataFragment(),
            };
            //Tab title array
            var titles = CharSequence.ArrayFromStringArray(new[] {
                GetString(Resource.String.strCall),

                GetString(Resource.String.strData),
            });
            var viewPager = FindViewById <ViewPager>(Resource.Id.viewpagerIcon);

            //viewpager holding fragment array and tab title text
            viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);

            // Give the TabLayout the ViewPager
            tabLayout.SetupWithViewPager(viewPager);
            //tabLayout.SetTabTextColors(
            FnSetIcons();
            //FnSetupTabIconsWithText ();
        }
Exemplo n.º 21
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            var fragments = new Android.Support.V4.App.Fragment[]
            {
                new TimeFragment(),
                new StopwatchFragment(),
                new AboutFragment()
            };

            var titles = CharSequence.ArrayFromStringArray(new []
            {
                "Time",
                "Stopwatch",
                "About"
            });

            //
            // Use FindViewById to get a reference to the ViewPager in the UI
            //
            var viewPager = FindViewById <Android.Support.V4.View.ViewPager>(Resource.Id.viewPager);

            //
            // Create a ClockAdapter and assign it to the ViewPager's Adapter property
            //
            viewPager.Adapter = new ClockAdapter(base.SupportFragmentManager, fragments, titles);
        }
Exemplo n.º 22
0
        private void FnInitTabLayout()
        {
            tabLayout.SetTabTextColors(Android.Graphics.Color.Aqua, Android.Graphics.Color.AntiqueWhite);
            //Fragment array
            UserFragment    userFragment    = new UserFragment();
            RubricFragment  rubricFragment  = new RubricFragment();
            RatingFragment  ratingFragment  = new RatingFragment();
            ReporteFragment reporteFragment = new ReporteFragment();

            Repository.mActionGetRubrAdapter  = GetRubricAdapter;
            Repository.mActionGetArrey        = GetArrey;
            Repository.mActionGetAdapter      = GetUserAdapter;
            ratingFragment.mActionGetArreyRep = GetRatingAdapter;
            reporteFragment.mActionGetArrey   = GetReporteAdapter;
            if (Repository.UserId == 61)
            {
                var fragments = new Android.Support.V4.App.Fragment[]
                {
                    userFragment,
                    rubricFragment,
                    ratingFragment,
                    reporteFragment,
                };
                //Tab title array
                var titles = CharSequence.ArrayFromStringArray(new[] {
                    "Пользователи",
                    "Рубрики",
                    "Рейтинг",
                    "Отчёт",
                });
                var viewPager = FindViewById <ViewPager>(Resource.Id.viewpager);
                //viewpager holding fragment array and tab title text
                viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);
                // Give the TabLayout the ViewPager

                tabLayout.SetupWithViewPager(viewPager);
            }
            else if (Repository.UserId != 61)
            {
                var fragments = new Android.Support.V4.App.Fragment[]
                {
                    rubricFragment,
                    ratingFragment,
                };
                //Tab title array
                var titles = CharSequence.ArrayFromStringArray(new[] {
                    "Рубрики",
                    "Рейтинг",
                });
                var viewPager = FindViewById <ViewPager>(Resource.Id.viewpager);
                //viewpager holding fragment array and tab title text
                viewPager.Adapter = new TabsFragmentPagerAdapter(SupportFragmentManager, fragments, titles);
                // Give the TabLayout the ViewPager

                tabLayout.SetupWithViewPager(viewPager);
            }
        }
Exemplo n.º 23
0
        private void ShowNotification()
        {
            try
            {
                Toast.MakeText(this, "You have raised your hand. Please wait, a waiter will be with you soon.", ToastLength.Long).Show();
                Intent        notificationIntent = new Intent(this, typeof(DashBoardActivity));
                PendingIntent pendingIntent      = PendingIntent.GetActivity(this, 0, notificationIntent, PendingIntentFlags.OneShot);

                NotificationCompat.Builder notificationBuilder;
                string channelId           = "restly_notification_channel";
                string channelName         = "Restly Notification Channel";
                var    notificationManager = NotificationManager.FromContext(this);
                notificationManager.CancelAll();
                if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
                {
                    var notificationChannel = new NotificationChannel(channelId,
                                                                      CharSequence.ArrayFromStringArray(new string[] { channelName })[0],
                                                                      NotificationImportance.High);
                    notificationChannel.EnableLights(true);
                    notificationChannel.EnableVibration(true);
                    notificationManager.CreateNotificationChannel(notificationChannel);
                    notificationBuilder = new NotificationCompat.Builder(this, channelId);
                }
                else
                {
                    notificationBuilder = new NotificationCompat.Builder(this, channelId);
                }
                notificationBuilder.SetContentTitle("Restly Notifications");
                notificationBuilder.SetContentText("You have raised your hand. Please wait, a waiter will be with you soon.");

                if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
                {
                    notificationBuilder.SetSmallIcon(Resource.Drawable.Icon);
                    notificationBuilder.SetColor(Resource.Color.white_color);
                }
                else
                {
                    notificationBuilder.SetSmallIcon(Resource.Drawable.Icon);
                    notificationBuilder.SetLargeIcon(BitmapFactory.DecodeResource(Application.Context.Resources, Resource.Drawable.Icon));
                }

                notificationBuilder.SetStyle(new NotificationCompat.BigTextStyle());
                notificationBuilder.SetAutoCancel(true);
                notificationBuilder.SetContentIntent(pendingIntent);
                notificationBuilder.SetVisibility((int)NotificationVisibility.Public);
                notificationBuilder.SetPriority((int)NotificationCompat.PriorityHigh);


                var notification = notificationBuilder.Build();
                notificationManager.Notify(0, notification);
            }
            catch (Exception ex)
            {
                Mvx.IoCProvider.Resolve <IAppLogger>().DebugLog(nameof(DashBoardActivity), ex);
            }
        }
Exemplo n.º 24
0
        public override ICharSequence ConvertToStringFormatted(ICursor cursor)
        {
            var convertMe = new string[1];

            convertMe [0] = cursor.GetString(COLUMN_DISPLAY_NAME);

            var converted = CharSequence.ArrayFromStringArray(convertMe);

            return(converted [0]);
        }
Exemplo n.º 25
0
 public override ICharSequence GetPageTitleFormatted(int position)
 {
     if (isTitlee == true)
     {
         return(titles[position]);
     }
     else
     {
         var titles = CharSequence.ArrayFromStringArray(new[] { "" });
         return(titles[0]);
     }
 }
Exemplo n.º 26
0
        public override ICharSequence GetPageTitleFormatted(int position)
        {
            List <string> stringList = new List <string>();

            fragmentList.ForEach(delegate(Fragment fragment)
            {
                jumpHelperFragment jumpHelperFrag = (jumpHelperFragment)fragment;
                string title = jumpHelperFrag.Title;
                stringList.Add(title);
            });
            return(CharSequence.ArrayFromStringArray(stringList.ToArray())[position]);
        }
Exemplo n.º 27
0
 public override ICharSequence GetPageTitleFormatted(int position)
 {
     // Generate title based on item position
     if (mActivityName == "StatsTable")
     {
         return(CharSequence.ArrayFromStringArray(mTabNames)[position]);
     }
     else
     {
         return(CharSequence.ArrayFromStringArray(mColumNames)[position]);
     }
 }
Exemplo n.º 28
0
        void viepageratama()
        {
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("how-to-uses");

            if (Donus != null)
            {
                HowToUseInfomationDTO1 = Newtonsoft.Json.JsonConvert.DeserializeObject <List <HowToUseInfomationDTO> >(Donus.ToString());
                if (HowToUseInfomationDTO1.Count > 0)
                {
                    var AnimationList = new string[] {
                        "kamerasil.json",
                        "hdr.json",
                        "odakla.json",
                        "ucler.json",
                        "kompozisyon.json",
                        "zoomyapma.json",
                        "yeterliisik.json",
                        "stop.json",
                        "birdenfazlafoto.json"
                    };
                    fragments = new Android.Support.V4.App.Fragment[HowToUseInfomationDTO1.Count];
                    for (int i = 0; i < HowToUseInfomationDTO1.Count; i++)
                    {
                        fragments[i] = new InformationFragmentParca(HowToUseInfomationDTO1[i], AnimationList[i]);
                    }
                    var titelssss = new string[HowToUseInfomationDTO1.Count];
                    var titles    = CharSequence.ArrayFromStringArray(titelssss);
                    try
                    {
                        this.RunOnUiThread(delegate() {
                            if (fragments.Length > 0)
                            {
                                viewpager.Adapter = new TabPagerAdaptor(this.SupportFragmentManager, fragments, titles);
                                _indicator.SetViewPager(viewpager);
                                ((CirclePageIndicator)_indicator).Snap = true;
                                var density = Resources.DisplayMetrics.Density;
                                //((CirclePageIndicator)_indicator).SetBackgroundColor(Color.Argb(255, 204, 204, 204));
                                ((CirclePageIndicator)_indicator).Radius      = 5 * density;
                                ((CirclePageIndicator)_indicator).PageColor   = Color.ParseColor("#00A1FF");
                                ((CirclePageIndicator)_indicator).FillColor   = Color.Transparent;
                                ((CirclePageIndicator)_indicator).StrokeColor = Color.ParseColor("#00A1FF");
                                ((CirclePageIndicator)_indicator).StrokeWidth = 3f;
                            }
                        });
                    }
                    catch
                    {
                    }
                }
            }
        }
Exemplo n.º 29
0
        public static void Construct(FragmentActivity activity, Toolbar toolbar)
        {
            MovieDbFactory.RegisterSettings(new MovieDbSettings());
            _topRatedHelper = new MovieHelper();
            _searchHelper   = new MovieHelper();
            _movieApi       = MovieDbFactory.Create <IApiMovieRequest>().Value;

            _topRatedFragment = new TopRatedMoviesFragment(_topRatedHelper, _movieApi);

            var fragments = new Fragment[]
            {
                new MovieSearchFragment(_searchHelper, _movieApi),
                _topRatedFragment
            };
            var titles = CharSequence.ArrayFromStringArray(new[]
            {
                activity.GetString(Resource.String.SearchTab),
                activity.GetString(Resource.String.TopRatedTab)
            });

            var viewPager = activity.FindViewById <ViewPager>(Resource.Id.viewpager);

            viewPager.Adapter = new TabsFragmentPagerAdapter(activity.SupportFragmentManager, fragments, titles);

            // Give the TabLayout the ViewPager
            var tabLayout = activity.FindViewById <TabLayout>(Resource.Id.sliding_tabs);

            tabLayout.SetupWithViewPager(viewPager);

            tabLayout.TabSelected += async(sender, args) =>
            {
                var tab = args.Tab;
                if (tab.Position == 1)
                {
                    viewPager.SetCurrentItem(tab.Position, true);
                    var manager = (InputMethodManager)activity.GetSystemService(Context.InputMethodService);
                    manager.HideSoftInputFromWindow(activity.CurrentFocus.WindowToken, 0);
                    await _topRatedFragment.GetMovies();
                }
                else
                {
                    viewPager.SetCurrentItem(tab.Position, true);
                }
            };

            SetToolbar(activity, toolbar);
        }
Exemplo n.º 30
0
        public static bool EqualsAny(string cs, string[] strs)
        {
            global::Java.Lang.String          jls_cs    = cs == null ? null : new global::Java.Lang.String(cs);
            global::Java.Lang.ICharSequence[] jlca_strs = CharSequence.ArrayFromStringArray(strs);
            bool __result = EqualsAny(jls_cs, jlca_strs);
            var  __rsval  = __result;

            jls_cs?.Dispose();
            if (jlca_strs != null)
            {
                foreach (global::Java.Lang.String s in jlca_strs)
                {
                    s?.Dispose();
                }
            }
            return(__rsval);
        }