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

            SetContentView(Resource.Layout.activity_sgv);

            Title     = "SGV";
            mGridView = (StaggeredGridView)FindViewById(Resource.Id.grid_view);

            LayoutInflater layoutInflater = LayoutInflater;

            View     header         = layoutInflater.Inflate(Resource.Layout.list_item_header_footer, null);
            View     footer         = layoutInflater.Inflate(Resource.Layout.list_item_header_footer, null);
            TextView txtHeaderTitle = (TextView)header.FindViewById(Resource.Id.txt_title);
            TextView txtFooterTitle = (TextView)footer.FindViewById(Resource.Id.txt_title);

            txtHeaderTitle.Text = "THE HEADER!";
            txtFooterTitle.Text = "THE FOOTER!";

            mGridView.AddHeaderView(header);
            mGridView.AddFooterView(footer);
            mAdapter = new SampleAdapter(this, Resource.Id.txt_line1);

            // do we have saved data?
            if (savedInstanceState != null)
            {
                mData = savedInstanceState.GetStringArrayList(SAVED_DATA_KEY).ToList();
            }

            if (mData == null)
            {
                mData = SampleData.GenerateSampleData();
            }

            foreach (string data in mData)
            {
                mAdapter.Add(data);
            }

            mGridView.Adapter                 = mAdapter;
            mGridView.OnScrollListener        = this;
            mGridView.OnItemClickListener     = this;
            mGridView.OnItemLongClickListener = this;
        }
            public override void OnActivityCreated(Bundle savedInstanceState)
            {
                base.OnActivityCreated(savedInstanceState);

                MGridView = (StaggeredGridView)View.FindViewById(Resource.Id.grid_view);

                if (savedInstanceState == null)
                {
                    LayoutInflater layoutInflater = Activity.LayoutInflater;

                    View     header         = layoutInflater.Inflate(Resource.Layout.list_item_header_footer, null);
                    View     footer         = layoutInflater.Inflate(Resource.Layout.list_item_header_footer, null);
                    TextView txtHeaderTitle = (TextView)header.FindViewById(Resource.Id.txt_title);
                    TextView txtFooterTitle = (TextView)footer.FindViewById(Resource.Id.txt_title);
                    txtHeaderTitle.Text = "THE HEADER!";
                    txtFooterTitle.Text = "THE FOOTER!";

                    MGridView.AddHeaderView(header);
                    MGridView.AddFooterView(footer);
                }

                if (MAdapter == null)
                {
                    MAdapter = new SampleAdapter(Activity, Resource.Id.txt_line1);
                }

                if (MData == null)
                {
                    MData = SampleData.GenerateSampleData();
                }

                foreach (string data in MData)
                {
                    MAdapter.Add(data);
                }

                MGridView.Adapter             = MAdapter;
                MGridView.OnScrollListener    = this;
                MGridView.OnItemClickListener = this;
            }