Java.Lang.IllegalStateException : you need to use Theme.Appcompat theme with this acitivy

juliodanieljuliodaniel IDMember
edited July 2016 in Xamarin.Forms

hey guys, I have a problem about Theme.AppCOmpat. I try many times but I cant solve this problem and I think the problem is to my mainpage, main axml and styles xml.. here is the code
`using Android.App;
using Android.Views;
using Android.OS;
using SupportToolbar = Android.Support.V7.Widget.Toolbar;
using SupportActionBar = Android.Support.V7.App.ActionBar;
using Android.Support.V7.App;
using Android.Support.Design.Widget;
using Android.Support.V4.View;
using System;
using Android.Widget;
using Android.Content;

namespace E_Library1.Droid
{
[Activity (Label = "E_Library1.Droid", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : AppCompatActivity
{

    protected override void OnCreate (Bundle bundle)
    {
        base.OnCreate (bundle);

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

        // Get our button from the layout resource,
        // and attach an event to it
        Button buttonSignIn = FindViewById<Button>(Resource.Id.btnLogIn);
        buttonSignIn.Click += delegate
        {
            var intent = new Intent(this, typeof(HomePage1));
            StartActivity(intent);
        };

        Button buttonSignUp = FindViewById<Button>(Resource.Id.btnSignUp);
        buttonSignUp.Click += delegate
        {
            var intent = new Intent(this, typeof(SignUp));
            StartActivity(intent);
        };
    }
}

}
this is the main axml <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="100"
android:minWidth="25px"
android:minHeight="25px">






</android.support.v4.widget.DrawerLayout> this is the styles.xml
``

#219653 #17693a #17693a

`
``

Answers

Sign In or Register to comment.