2011-09-08 59 views
0

我正在嘗試複製圖庫教程的monodroid示例。 但是這個例子缺少一個重要的觀點:如何設置ImageView的背景風格。 在Android教程中,我們有以下代碼:monodroid中的obtainStyledAttributes

TypedArray attr = mContext.obtainStyledAttributes(R.styleable.HelloGallery); 
    mGalleryItemBackground = attr.getResourceId(R.styleable.HelloGallery_android_galleryItemBackground, 0); 
    attr.recycle(); 

    .... 

    imageView.setBackgroundResource(mGalleryItemBackground); 

我不知道我應該怎麼複製它在MonoDroid的! 在此先感謝, 亞歷克斯

回答