Exemplo n.º 1
0
 private void Init(int index)
 {
     _fragmentManager      = SupportFragmentManager;
     _bottomNavigationView = (BottomNavigationView)FindViewById(Resource.Id.navigation);
     _bottomNavigationView.SetOnNavigationItemSelectedListener(this);
     _bottomNavigationView.SelectedItemId = _bottomNavigationView.Menu.GetItem(index).ItemId;
 }
Exemplo n.º 2
0
 public ShellFragmentStateAdapter(
     ShellSection shellSection,
     AndroidX.Fragment.App.FragmentManager fragmentManager,
     IMauiContext mauiContext) : base(fragmentManager, (mauiContext.Context.GetActivity() as AppCompatActivity).Lifecycle)
 {
     _mauiContext  = mauiContext;
     _shellSection = shellSection;
     SectionController.ItemsCollectionChanged += OnItemsCollectionChanged;
 }
Exemplo n.º 3
0
 public ViewPagerAdapter(AndroidX.Fragment.App.FragmentManager fragmentManager)
     : base(fragmentManager, BehaviorResumeOnlyCurrentFragment)
 {
     pages = new List <BaseFragment>
     {
         new ScrollFragment(),
         new ListFragment(),
         new ImageFragment()
     };
 }
Exemplo n.º 4
0
#pragma warning disable CS0618 // Type or member is obsolete
        public PivotAdapter(AndroidX.Fragment.App.FragmentManager fragmentManager, NativePivotPresenter pivot)
            : base(fragmentManager)
        {
            if (pivot == null)
            {
                throw new ArgumentNullException(nameof(pivot));
            }

            _pivot     = pivot;
            _fragments = new List <PivotItemFragment>();
        }
Exemplo n.º 5
0
 public MainTabAdapter(FragmentManager fragmentManager, Lifecycle lifecycle) : base(fragmentManager, lifecycle)
 {
     try
     {
         Fragments = new List<Fragment>();
         FragmentNames = new List<string>();
     }
     catch (Exception exception)
     {
         Methods.DisplayReportResultTrack(exception);
     }
 }
Exemplo n.º 6
0
 public MainTabAdapter(FragmentManager fm, int behavior) : base(fm, behavior)
 {
     try
     {
         Fragments     = new List <SupportFragment>();
         FragmentNames = new List <string>();
     }
     catch (Exception exception)
     {
         Methods.DisplayReportResultTrack(exception);
     }
 }
Exemplo n.º 7
0
#pragma warning disable 618
        public MainTabAdapter(FragmentManager fm) : base(fm)
#pragma warning restore 618
        {
            try
            {
                Fragments     = new List <SupportFragment>();
                FragmentNames = new List <string>();
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }
Exemplo n.º 8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            FragmentManager = this.SupportFragmentManager;

            FragmentManager.BackStackChanged += FragmentManager_BackStackChanged;

            App.Navigation = new NavigationService(FragmentManager, new Dictionary <Type, Type>()
            {
                { typeof(FirstViewModel), typeof(FirstFragment) },
                { typeof(SecondViewModel), typeof(SecondFragment) },
                { typeof(ThirdViewModel), typeof(ThirdFragment) }
            });

            App.Navigation.NavigateAsync <FirstViewModel>();
        }
Exemplo n.º 9
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            manager = SupportFragmentManager;
            base.OnCreate(savedInstanceState);
            Console.WriteLine(" Selection Activity 54 oncreate");

            SetNativeView(ContentManager.pageController);

            ActionBar?.Hide();
            TouchEffect.activity = this;

            ContentManager.SetNativeViewFunctionAction(SetNativeView);

            GetLoginResult(savedInstanceState);

            ContentManager.InitializeApp();

            // UpdateUserEvent();
            // GetUserEvent();
        }
Exemplo n.º 10
0
        public PlayersScoreSectionsPagerAdapter(GameScoreActivity context, AndroidX.Fragment.App.FragmentManager fm, ViewPager viewPager) : base(fm)
        {
            Activity             = context;
            PlayerScoreFragments = new PlaceholderPlayerScoreFragment[Count];

            selectedPages = new List <int>();
            selectedPages.Add(0);

            ViewPager         = viewPager;
            ViewPager.Adapter = this;

            viewPager.PageSelected += new EventHandler <ViewPager.PageSelectedEventArgs>((object sender, ViewPager.PageSelectedEventArgs e) =>
            {
                RestoreValues(e.Position);
                if (!selectedPages.Contains(e.Position))
                {
                    selectedPages.Add(e.Position);
                }
            });
        }
Exemplo n.º 11
0
 public PivotAdapter(AndroidX.Fragment.App.FragmentManager fm) : base(fm)
 {
 }
 public InAppContentObserver(Context context, AndroidX.Fragment.App.FragmentManager fragmentManager) : base(context)
 {
     _fragmentManager = fragmentManager;
 }
Exemplo n.º 13
0
 public CustomPagerAdapter(AndroidX.Fragment.App.FragmentManager fm) : base(fm)
 {
     trackingFragment = new TrackingFragment();
     tracksFragment   = new TracksFragment();
     logsFragment     = new LogsFragment();
 }
 public IntroPagerAdapter(FragmentManager manager) : base(manager)
 {
 }
 public ImagePagerAdapter(AndroidX.Fragment.App.FragmentManager fm, ImageInfo [] infos, Activity parent) : base(fm)
 {
     this.infos  = infos;
     this.Parent = parent;
 }
Exemplo n.º 16
0
 public PickerAdapter(AndroidX.Fragment.App.FragmentManager fm)
     : base(fm)
 {
     timePickerFragment = new TimePickerFragment();
     datePickerFragment = new DatePickerFragment();
 }
Exemplo n.º 17
0
 public ViewPagerAdapter(AndroidX.Fragment.App.FragmentManager fragmentmanager) : base(fragmentmanager)
 {
     fragment      = new List <AndroidX.Fragment.App.Fragment>();
     fragmentNames = new List <string>();
 }
Exemplo n.º 18
0
 public IntroPagerAdapter(FragmentManager manager, int pageCount) : base(manager, BehaviorResumeOnlyCurrentFragment)
 {
     Count = pageCount;
 }
Exemplo n.º 19
0
 public TabsAdapter(Context context, AndroidX.Fragment.App.FragmentManager fm) : base(fm)
 {
     titles = context.Resources.GetTextArray(Resource.Array.sections);
 }