How to get the background image of a button control in Xmarine Android c#?

soumenhaldersoumenhalder Member ✭✭
edited September 17 in Xamarin.Android

Hello,
I am using a button control. I want get the android:background (image source) from code behind. Based on that I will continue with my code.
How can I get the image source from code behind?

 <Button

android:id="@+id/btnPlayPause"

android:layout_width="34dp"

android:layout_height="34dp"

android:layout_marginLeft="15dp"

android:visibility="gone"

android:background="@drawable/play"/>

Best Answers

Answers

  • soumenhaldersoumenhalder Member ✭✭

    Thank you, Now I want to mach this Drawable >> "bitmap" with a perticular image of my Resource folder of my application.
    the code will be like
    if (bitmap == Resource.Drawable.MyImage)
    {
    // my work
    }
    how to achieve this?

Sign In or Register to comment.