Visual Studio Android can not setDrawingCacheEnabled

HaBe1963HaBe1963 NLMember ✭✭
edited February 2017 in Xamarin.Android

Hi,

I'm trying to implement below code in my Android app build with Visual Studio 2015,

        private Bitmap GetScreenViewBitmap(View v)
        {
            v.setDrawingCacheEnabled(true);
            v.BuildDrawingCache(true);
            Bitmap b = Bitmap.CreateBitmap(v.GetDrawingCache(true));

            v.setDrawingCacheEnabled(false); // clear drawing cache
        }

But Visual Studio returns "error CS1061: 'View' does not contain a definition for 'setDrawingCacheEnabled' and no extension method 'setDrawingCacheEnabled' accepting a first argument of type 'View' could be found (are you missing a using directive or an assembly reference?)"

Which reference to I have to use?

Answers

Sign In or Register to comment.