با سلام
از fragment در برنامه ام(mono for android) استفاده می کنم بدین صورت که با کلیک بر روی هر ایتم fragment موردنظر باز میشه
xml صفحه اصلی
به صورت زیر است
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="right"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111" />
</android.support.v4.widget.DrawerLayout>
برای فراخوانی fragment به روش زیر عمل کردم
Android.App.FragmentTransaction ft;
ft = FragmentManager.BeginTransaction();
ft.Replace(Resource.Id.content_frame, new Customer());
ft.Commit();
ولی رویداد کلیک باتن در خود fragment با خطای زیر روبرو میشه
An unhandled exception occured.
از SetOnClickListener هم استفاده کردم بازم همین خطا را میده