summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Platform.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Platform.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Platform.cs24
1 files changed, 10 insertions, 14 deletions
diff --git a/Xamarin.Forms.Platform.Android/Platform.cs b/Xamarin.Forms.Platform.Android/Platform.cs
index 87bf5354..8c289ef4 100644
--- a/Xamarin.Forms.Platform.Android/Platform.cs
+++ b/Xamarin.Forms.Platform.Android/Platform.cs
@@ -144,7 +144,7 @@ namespace Xamarin.Forms.Platform.Android
}
}
-#pragma warning disable 618
+#pragma warning disable 618 // Eventually we will need to determine how to handle the v7 ActionBarDrawerToggle for AppCompat
ActionBarDrawerToggle MasterDetailPageToggle { get; set; }
#pragma warning restore 618
@@ -458,7 +458,7 @@ namespace Xamarin.Forms.Platform.Android
Color colorToUse = Color.Default;
if (CurrentNavigationPage != null)
{
-#pragma warning disable 618
+#pragma warning disable 618 // Make sure Tint still works
if (CurrentNavigationPage.Tint != Color.Default)
colorToUse = CurrentNavigationPage.Tint;
#pragma warning restore 618
@@ -526,16 +526,14 @@ namespace Xamarin.Forms.Platform.Android
_renderer.AddView(renderView.ViewGroup);
}
-#pragma warning disable 618
+#pragma warning disable 618 // This may need to be updated to work with TabLayout/AppCompat
ActionBar.Tab AddTab(Page page, int index)
#pragma warning restore 618
{
ActionBar actionBar = ((Activity)_context).ActionBar;
TabbedPage currentTabs = CurrentTabbedPage;
-#pragma warning disable 618
- ActionBar.Tab atab = actionBar.NewTab();
-#pragma warning restore 618
+ var atab = actionBar.NewTab();
atab.SetText(page.Title);
atab.TabSelected += (sender, e) =>
{
@@ -594,7 +592,7 @@ namespace Xamarin.Forms.Platform.Android
void CurrentNavigationPageOnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
-#pragma warning disable 618
+#pragma warning disable 618 // Make sure Tint still works
if (e.PropertyName == NavigationPage.TintProperty.PropertyName)
#pragma warning restore 618
UpdateActionBarBackgroundColor();
@@ -688,9 +686,11 @@ namespace Xamarin.Forms.Platform.Android
var drawer = GetRenderer(CurrentMasterDetailPage) as MasterDetailRenderer;
if (drawer == null)
return;
-#pragma warning disable 618
+
+#pragma warning disable 618 // Eventually we will need to determine how to handle the v7 ActionBarDrawerToggle for AppCompat
MasterDetailPageToggle = new ActionBarDrawerToggle(_context as Activity, drawer, icon, 0, 0);
#pragma warning restore 618
+
MasterDetailPageToggle.SyncState();
}
@@ -741,9 +741,7 @@ namespace Xamarin.Forms.Platform.Android
return;
var page = sender as Page;
-#pragma warning disable 618
- ActionBar.Tab atab = actionBar.GetTabAt(currentTabs.Children.IndexOf(page));
-#pragma warning restore 618
+ var atab = actionBar.GetTabAt(currentTabs.Children.IndexOf(page));
atab.SetText(page.Title);
}
}
@@ -827,9 +825,7 @@ namespace Xamarin.Forms.Platform.Android
var i = 0;
foreach (Page tab in CurrentTabbedPage.Children.OfType<Page>())
{
-#pragma warning disable 618
- ActionBar.Tab realTab = AddTab(tab, i++);
-#pragma warning restore 618
+ var realTab = AddTab(tab, i++);
if (tab == CurrentTabbedPage.CurrentPage)
realTab.Select();
}