Adding background color and image to spinner in android xamarin

Viewed 986

I am trying to add a grey background color to spinner and its itemrow,want to change text color to blue and want to place image in right of spinner .Currently i am getting white color in note device and black color in tab device. i am very new to android please help me.

main.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <Spinner
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/moviesSpinner"
        android:prompt="@string/movie_prompt" />
    <ImageView
        android:src="@android:drawable/Icon"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:id="@+id/imageView1" />
</LinearLayout>

itemrow.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:background="#ffffff"
    android:padding="3dip">
    <TextView
        android:padding="3dip"
        android:layout_marginTop="2dip"
        android:textColor="#C11B17"
        android:textStyle="bold"
        android:id="@+id/company"
        android:layout_marginLeft="5dip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</RelativeLayout>

mainActivity.cs

var moviesSpinner1 = FindViewById<Spinner>(Resource.Id.moviesSpinner);
            moviesSpinner1.Adapter = new MoviesAdapter(this, MoviesRepository.Movies);
1 Answers
Related