سلام
من ورژن اندروید برنامه را روی 4.4 گذاشتم.ولی برنامه با شبیه ساز ورژن 5 به پایین کار نمیکنه.ولی در 5 به بالا درسته و دراور را نشون میده
در ورژن ها پایین تر خطا میده
مگه AppCompat واسه اجرای متریال دیزاین در اندروید 5 به پایین نیست؟


قسمت activity_main.axml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/MyToolBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/actionBarSize"
android:background="?android:attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark" />
<android.support.v4.widget.DrawerLayout
android:id="@+id/MyDrawer"
android:layout_height="match_parent"
android:layout_width="match_parent">
<RelativeLayout
android:layout_height="match_parent"
android:layout_width="match_parent">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="this Is My Drawer"
android:layout_centerInParent="true" />
</RelativeLayout>
<ListView
android:id="@+id/MyListView"
android:layout_height="match_parent"
android:layout_width="240dp"
android:choiceMode="singleChoice"
android:divider="#818181"
android:dividerHeight="1dp"
android:background="#e5ffff"
android:layout_gravity="start" />
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>


بخس استایل
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#ff1744</item>
<item name="drawerArrowStyle">@style/MyDrawerStyle</item>
</style>
<style name="MyDrawerStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">#ff1744</item>
<item name="spinBars">True</item>
</style>
</resources>


و بخش MainActivity.cs

using Android.App;
using Android.OS;
using Android.Runtime;
using Android.Widget;
using Android.Support.V7.App;
using Toolbar = Android.Support.V7.Widget.Toolbar;
using System.Collections.Generic;

namespace App23
{
[Activity(Label = "@string/app_name", Theme = "@style/MyTheme", MainLauncher = true)]
public class MainActivity : AppCompatActivity
{
private Toolbar mytoolbar;
private ListView MyListView;
private List<string> List;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

// Set our view from the "main" layout resource
SetContentView(Resource.Layout.activity_main);

mytoolbar = FindViewById<Toolbar>(Resource.Id.MyToolBar);
SetSupportActionBar(mytoolbar);
MyListView = FindViewById<ListView>(Resource.Id.MyListView);

List = new List<string>()
{
"About Us",
"Contact us",
"Web Site"
};
MyListView.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, List);
MyListView.ItemClick += MyListView_ItemClick;
}

private void MyListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
{
Toast.MakeText(this, List[e.Position], ToastLength.Short).Show();
}
}
}