I've just started programming not long ago so please bare with me.
The problem I am facing is I am unable to change the color of my Items inside the Listview to Black color.
My ListView's background (Which I've removed in order to see the items inside Listview) is supposed to be white background as well.
Inside my activity, I added my items using the adapter.add("Item"). Therefore I am lost trying to add an click event on that Item since it's a string.
Tried :
1) Changing properties directly in the axml file. Such as android:textColor/Foreground etc.
2) Adding a color.xml file and declaring it's color. Then calling that color variable to my listview component "android:thatcoloame"
3) Tried changing it from my coding inside my Activity. Such as mLeftItems.Foreground/TextColor etc. Even tried using android.graphics.color etc. It's not working for me.
My coding for my Listview is
mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.myDrawer);
mLeftDrawer = FindViewById<ListView>(Resource.Id.leftListView);
mLeftItems.Add("Add Device");
mLeftItems.Add("Discoect Device");
mLeftAdapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, mLeftItems);
mLeftDrawer.Adapter = mLeftAdapter;
For my .axml file it's
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myDrawer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<!-- The left navigation drawer -->
<ListView
android:id="@+id/leftListView"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:choiceMode="singleChoice"
android:divider="#D2D2D2"
android:dividerHeight="2dp" />
</android.support.v4.widget.DrawerLayout>
Any guidance or help is deeply appreciated.
