Пример #1
0
        protected override void OnCreate(Bundle bundle)
        {
            platformSpecificHandler = new PlatformSpecificHandler();

            platformSpecificHandler.StorageInterface = new AndroidStorage();
            platformSpecificHandler.ViewHandler      = new AndroidViewHandler();
            platformSpecificHandler.ToastManager     = new AndroidToastManager();
            platformSpecificHandler.FileReader       = new AndroidFileReader();



            handler    = new AnimalAdjectiveHandler(platformSpecificHandler);
            favourites = new FavouritesManager(platformSpecificHandler);

            this.sharedGeneralGUIHandler   = new SharedGeneralGUIHandler(platformSpecificHandler);
            this.sharedFavouriteGUIHandler = new SharedFavouritesGUIHandler(platformSpecificHandler, sharedGeneralGUIHandler);
            this.sharedHomeGUIHandler      = new SharedHomeGUIHandler(platformSpecificHandler, sharedGeneralGUIHandler);

            base.OnCreate(bundle);

            this.ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;

            this.AddTab("", Resource.Drawable.ic_action_play, new HomeFragment(handler, favourites, sharedGeneralGUIHandler, sharedHomeGUIHandler));
            this.AddTab("", Resource.Drawable.ic_action_favorite2, new FavouritesFragment(handler, favourites, sharedGeneralGUIHandler, sharedFavouriteGUIHandler));
            this.AddTab("", Resource.Drawable.ic_action_settings, new SettingsFragment());

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
        }
Пример #2
0
        public FavouritesFragment(AnimalAdjectiveHandler aaHandler, FavouritesManager favs,
                                  SharedGeneralGUIHandler sharedGUIHandler, SharedFavouritesGUIHandler favouritesGUIHandler)
        {
            this.handler    = aaHandler;
            this.favourites = favs;

            this._sharedGUIHandler     = sharedGUIHandler;
            this._favouritesGUIHandler = favouritesGUIHandler;
        }