First of all this post is related to that post: Xamarin Forms Android Error inflating class MaterialCalendarGridView
Before I post any code: The Flyout configuration of Xamarin Forms is correct! If I set IsPresented = true;
in my flyoutpage the flyout menu is displayed correctly, the only problem I have is, that the top toolbar and the hamburger menu icon is missing completely on Android.
Here is the definition of my MainActivity.cs
:
[Activity(ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Portrait, LaunchMode = LaunchMode.SingleTop, MainLauncher = true, Theme = "@style/MyTheme")]
[IntentFilter(new[] { Intent.ActionView},
DataScheme = "https",
DataHost = "myapp.com",
AutoVerify = true,
Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable})]
[IntentFilter(new[] { Intent.ActionView },
DataScheme = "http",
DataHost = "myapp.com",
AutoVerify = true,
Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable })]
public class MainActivity : FormsAppCompatActivity, Android.Gms.Tasks.IOnSuccessListener
{
....
Here is my style.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<style name="MyTheme" parent="Theme.MaterialComponents.Light">
<item name="android:colorPrimary">#ec1a23</item>
<item name="android:colorPrimaryDark">#dd2c00</item>
<item name="android:colorAccent">#ff3d00</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Splash" parent="Theme.MaterialComponents.Light">
<item name="android:windowBackground">@drawable/splashscreen</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
As seen mentioned as a solution in the related post, I´m not able to create a toolbar.xml
file, because my app would crash at the startup. Regarding the AppCompat
and Flyout
documentation, it is not necessary at all.
I really don´t know what is the problem here.