summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorsoftlion <benjamin@vapolia.fr>2016-09-30 08:59:58 (GMT)
committerStephane Delcroix <stephane@delcroix.org>2016-11-08 13:33:33 (GMT)
commit2b4c7c7931f12285c637bfea04c3695a24fc8bbf (patch)
treea508878e630511e383ed6be77b9ae9d2412e00c4 /Xamarin.Forms.Platform.Android
parentd43b8a2da6681518b6b765f748a79b5fcf5927ac (diff)
downloadxamarin-forms-2b4c7c7931f12285c637bfea04c3695a24fc8bbf.zip
xamarin-forms-2b4c7c7931f12285c637bfea04c3695a24fc8bbf.tar.gz
xamarin-forms-2b4c7c7931f12285c637bfea04c3695a24fc8bbf.tar.bz2
Add extensibility point to load tab icons from another source (using the tab.SetIcon(drawable) overload) on Android
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
index 211d248..1f19e29 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
@@ -383,11 +383,16 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
continue;
TabLayout.Tab tab = tabs.GetTabAt(i);
- tab.SetIcon(ResourceManager.IdFromTitle(icon, ResourceManager.DrawableClass));
+ SetTabIcon(tab, icon);
}
}
- void UpdateBarBackgroundColor()
+ protected virtual void SetTabIcon(TabLayout.Tab tab, FileImageSource icon)
+ {
+ tab.SetIcon(ResourceManager.IdFromTitle(icon, ResourceManager.DrawableClass));
+ }
+
+ void UpdateBarBackgroundColor()
{
if (_disposed || _tabLayout == null)
return;