2011-09-08 4 views
0

Je suis en train de répliquer monodroid par exemple pour didacticiel galerie. Mais il manque un point important à l'exemple: comment définir le style d'arrière-plan de ImageView. Le tutoriel Android, nous avons le code suivant:obtenirStyledAttributes dans monodroid

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

    .... 

    imageView.setBackgroundResource(mGalleryItemBackground); 

Je ne sais pas comment dois-je répliquer dans MonoDroid! Merci d'avance, Alex

Répondre