Exemplo n.º 1
0
        private void PrepareBackgroundManager()
        {
            BackgroundManager backgroundManager = BackgroundManager.GetInstance(this.Activity);

            backgroundManager.Attach(this.Activity.Window);
            mBackgroundTarget  = new PicassoBackgroundManagerTarget(backgroundManager);
            mDefaultBackground = Resources.GetDrawable(Resource.Drawable.default_background);
            mMetrics           = new DisplayMetrics();
            this.Activity.WindowManager.DefaultDisplay.GetMetrics(mMetrics);
        }
Exemplo n.º 2
0
        public override void OnCreate(Bundle savedInstanceState)
        {
            Log.Info(TAG, "onCreate DetailsFragment");
            base.OnCreate(savedInstanceState);

            BackgroundManager backgroundManager = BackgroundManager.GetInstance(this.Activity);

            backgroundManager.Attach(this.Activity.Window);
            mBackgroundTarget = new PicassoBackgroundManagerTarget(backgroundManager);

            mDefaultBackground = Resources.GetDrawable(Resource.Drawable.default_background);

            mMetrics = new DisplayMetrics();
            Activity.WindowManager.DefaultDisplay.GetMetrics(mMetrics);
            //selectedMovie = Utils.Deserialize (this.Activity.Intent.GetSerializableExtra ("Movie"));
            selectedMovie = Utils.Deserialize(this.Activity.Intent.GetStringExtra(GetString(Resource.String.movie)));               //TODO make this work
            Log.Debug(TAG, "DetailsActivity movie: " + selectedMovie.ToString());
            new DetailRowBuilderTask(this).Execute(selectedMovie);
            OnItemViewClickedListener = this;
        }