How do I change the color of the actionbar and get the horizontal line back?
I have a successful android app developed in native xamarin android. Now i'm trying to port it to Xamarin Forms using the xaml approach.
I've created a hello world app and added a toolbar item the contentPage. When I initially start the app, the action bar is visible with my icon, the normal teal background and there is a nice horizontal line. However, once my forms code kicks in, it displays my icon, my toolbaritem icon, but the background is black and there is no horizontal line.
I've tried NavigationPage.BackgroundColor and that had no affect. I'm thinking i'm doing something small wrong.
Here is my xaml.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage.Title> My Sample </ContentPage.Title>
<ContentPage.ToolbarItems>
<ToolbarItem Name="test" Icon="ic_action_refresh" ></ToolbarItem>
</ContentPage.ToolbarItems>
<Label Text="Hello Forms" VerticalOptions="Center" HorizontalOptions="Center" />
</ContentPage>
Here is my app.cs
public class App
{
public static Page GetMainPage()
{
var nav = new NavigationPage(new Splash());
nav.BackgroundColor = Color.Teal;
return nav;
}
}
I'd also like to hide the default actionbar at startup and go with a full splash screen, but I did find this thread that looks like it'll work. http://forums.xamarin.com/discussion/18290/hiding-the-status-bar-and-the-action-bar-in-android-app