├── DynamicallyChangeTabIcons ├── iOS │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Resources │ │ ├── tab_chat.png │ │ ├── tab_graph.png │ │ ├── tab_target.png │ │ ├── tab_chat@2x.png │ │ ├── tab_chat@3x.png │ │ ├── tab_graph@2x.png │ │ ├── tab_graph@3x.png │ │ ├── tab_target@2x.png │ │ └── tab_target@3x.png │ ├── Entitlements.plist │ ├── packages.config │ ├── Main.cs │ ├── AppDelegate.cs │ ├── LaunchScreen.storyboard │ ├── Info.plist │ └── TabIcons.iOS.csproj ├── Droid │ ├── Resources │ │ ├── drawable │ │ │ └── icon.png │ │ ├── drawable-hdpi │ │ │ ├── icon.png │ │ │ ├── tab_chat.png │ │ │ ├── tab_graph.png │ │ │ └── tab_target.png │ │ ├── drawable-xhdpi │ │ │ ├── icon.png │ │ │ ├── tab_chat.png │ │ │ ├── tab_graph.png │ │ │ └── tab_target.png │ │ ├── drawable-xxhdpi │ │ │ ├── icon.png │ │ │ ├── tab_chat.png │ │ │ ├── tab_graph.png │ │ │ └── tab_target.png │ │ ├── drawable-mdpi │ │ │ ├── tab_chat.png │ │ │ ├── tab_graph.png │ │ │ └── tab_target.png │ │ ├── drawable-xxxhdpi │ │ │ ├── tab_chat.png │ │ │ ├── tab_graph.png │ │ │ └── tab_target.png │ │ ├── layout │ │ │ ├── Toolbar.axml │ │ │ └── Tabbar.axml │ │ ├── values │ │ │ └── styles.xml │ │ └── AboutResources.txt │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── packages.config │ ├── MyTabsRenderer.cs │ └── TabIcons.Droid.csproj ├── TabIcons │ ├── Interfaces │ │ └── IIconChange.cs │ ├── App.xaml │ ├── TabIconsPage.xaml │ ├── TabIconsPage2.xaml │ ├── TabIconsPage2.xaml.cs │ ├── TabIconsPage.xaml.cs │ ├── App.xaml.cs │ ├── ViewModel │ │ ├── Tab1ViewModel.cs │ │ └── Tab2ViewModel.cs │ ├── TabIcons.shproj │ ├── MyTabs.cs │ └── TabIcons.projitems └── TabIcons.sln ├── GooglePlayLocationAPIs ├── LocationUpdates │ ├── Resources │ │ ├── values │ │ │ ├── integers.xml │ │ │ ├── arrays.xml │ │ │ ├── dimens.xml │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── drawable │ │ │ └── Icon.png │ │ ├── drawable-hdpi │ │ │ └── Icon.png │ │ ├── drawable-mdpi │ │ │ └── Icon.png │ │ ├── drawable-xhdpi │ │ │ └── Icon.png │ │ ├── drawable-xxhdpi │ │ │ └── Icon.png │ │ ├── drawable-xxxhdpi │ │ │ └── Icon.png │ │ ├── layout │ │ │ ├── toolbar.axml │ │ │ └── main.axml │ │ ├── values-v21 │ │ │ └── styles.xml │ │ └── AboutResources.txt │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainApplication.cs │ ├── packages.config │ ├── BlankAppCompat.csproj.bak │ ├── MainActivity.cs │ └── LocationUpdates.csproj ├── Readme.md └── LocationUpdates.sln ├── README.md ├── LICENSE ├── .editorconfig └── .gitignore /DynamicallyChangeTabIcons/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_chat.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_graph.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_target.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_chat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_chat@2x.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_chat@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_chat@3x.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_graph@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_graph@2x.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_graph@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_graph@3x.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_target@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_target@2x.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Resources/tab_target@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/iOS/Resources/tab_target@3x.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2 4 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/drawable/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/GooglePlayLocationAPIs/LocationUpdates/Resources/drawable/Icon.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/tab_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/tab_chat.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/tab_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/tab_graph.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-mdpi/tab_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-mdpi/tab_chat.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-mdpi/tab_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-mdpi/tab_graph.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/tab_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/tab_chat.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/tab_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-hdpi/tab_target.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-mdpi/tab_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-mdpi/tab_target.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/tab_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/tab_graph.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/tab_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xhdpi/tab_target.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/tab_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/tab_chat.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/tab_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/tab_graph.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/tab_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xxhdpi/tab_target.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xxxhdpi/tab_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xxxhdpi/tab_chat.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xxxhdpi/tab_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xxxhdpi/tab_graph.png -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-hdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-hdpi/Icon.png -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-mdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-mdpi/Icon.png -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-xhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-xhdpi/Icon.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/drawable-xxxhdpi/tab_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/DynamicallyChangeTabIcons/Droid/Resources/drawable-xxxhdpi/tab_target.png -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-xxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-xxhdpi/Icon.png -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-xxxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesmontemagno/blog-samples/HEAD/GooglePlayLocationAPIs/LocationUpdates/Resources/drawable-xxxhdpi/Icon.png -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Section 1 5 | Section 2 6 | 7 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/Interfaces/IIconChange.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace TabIcons.Interfaces 3 | { 4 | public interface IIconChange 5 | { 6 | bool IsSelected { get; set; } 7 | string CurrentIcon { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/TabIconsPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/TabIconsPage2.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 240dp 4 | 16dp 5 | 16dp 6 | 7 | 16sp 8 | 9 | 10dp 10 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/TabIconsPage2.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using TabIcons.ViewModel; 3 | 4 | namespace TabIcons 5 | { 6 | public partial class TabIconsPage2 : ContentPage 7 | { 8 | public TabIconsPage2() 9 | { 10 | InitializeComponent(); 11 | 12 | BindingContext = new Tab2ViewModel(); 13 | 14 | //this.SetBinding(IconProperty, "CurrentIcon"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/TabIconsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using TabIcons.ViewModel; 3 | 4 | 5 | namespace TabIcons 6 | { 7 | public partial class TabIconsPage : ContentPage 8 | { 9 | public TabIconsPage() 10 | { 11 | InitializeComponent(); 12 | 13 | BindingContext = new Tab1ViewModel() 14 | { 15 | IsSelected = true 16 | }; 17 | 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace TabIcons.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/layout/toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #03A9F4 5 | #0288D1 6 | #FFC107 7 | #B3E5FC 8 | #FFFFFF 9 | #212121 10 | #727272 11 | #B6B6B6 12 | #E8E8E8 13 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace TabIcons.iOS 9 | { 10 | [Register("AppDelegate")] 11 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 12 | { 13 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 14 | { 15 | global::Xamarin.Forms.Forms.Init(); 16 | 17 | LoadApplication(new App()); 18 | 19 | return base.FinishedLaunching(app, options); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Blog Post Samples 2 | 3 | Sample from http://motzcod.es and http://blog.xamarin.com 4 | 5 | 6 | ### Created By: [@JamesMontemagno](http://twitter.com/jamesmontemagno) 7 | * Twitter: [@JamesMontemagno](http://twitter.com/jamesmontemagno) 8 | * Blog: [MotzCod.es](http://motzcod.es), [Micro Blog](http://motz.micro.blog) 9 | * Podcasts: [Merge Conflict](http://mergeconflict.fm), [Coffeehouse Blunders](http://blunders.fm), [The Xamarin Podcast](http://xamarinpodcast.com) 10 | * Video: [The Xamarin Show on Channel 9](http://xamarinshow.com), [YouTube Channel](https://www.youtube.com/jamesmontemagno) 11 | 12 | ## License 13 | The MIT License (MIT) see [License file](LICENSE) 14 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace TabIcons 4 | { 5 | public partial class App : Application 6 | { 7 | public App() 8 | { 9 | InitializeComponent(); 10 | 11 | MainPage = new MyTabs(); 12 | } 13 | 14 | protected override void OnStart() 15 | { 16 | // Handle when your app starts 17 | } 18 | 19 | protected override void OnSleep() 20 | { 21 | // Handle when your app sleeps 22 | } 23 | 24 | protected override void OnResume() 25 | { 26 | // Handle when your app resumes 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/ViewModel/Tab1ViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MvvmHelpers; 3 | using TabIcons.Interfaces; 4 | 5 | namespace TabIcons.ViewModel 6 | { 7 | public class Tab1ViewModel : BaseViewModel, IIconChange 8 | { 9 | 10 | public Tab1ViewModel() 11 | { 12 | Title = "Tab1"; 13 | } 14 | 15 | bool isSelected; 16 | public bool IsSelected 17 | { 18 | get => isSelected; 19 | set 20 | { 21 | if (SetProperty(ref isSelected, value)) 22 | OnPropertyChanged(nameof(CurrentIcon)); 23 | } 24 | } 25 | public string CurrentIcon 26 | { 27 | get => IsSelected ? "tab_target.png" : "tab_chat.png"; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/ViewModel/Tab2ViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MvvmHelpers; 3 | using TabIcons.Interfaces; 4 | 5 | namespace TabIcons.ViewModel 6 | { 7 | public class Tab2ViewModel : BaseViewModel, IIconChange 8 | { 9 | 10 | public Tab2ViewModel() 11 | { 12 | Title = "Tab2"; 13 | } 14 | 15 | bool isSelected; 16 | public bool IsSelected 17 | { 18 | get => isSelected; 19 | set 20 | { 21 | if (SetProperty(ref isSelected, value)) 22 | OnPropertyChanged(nameof(CurrentIcon)); 23 | } 24 | } 25 | public string CurrentIcon 26 | { 27 | get => IsSelected ? "tab_target.png" : "tab_graph.png"; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/Readme.md: -------------------------------------------------------------------------------- 1 | Ported from: https://github.com/googlesamples/android-play-location/tree/master/LocationUpdates 2 | 3 | Copyright 2014 Google, Inc. 4 | 5 | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content; 5 | using Android.Content.PM; 6 | using Android.Runtime; 7 | using Android.Views; 8 | using Android.Widget; 9 | using Android.OS; 10 | 11 | namespace TabIcons.Droid 12 | { 13 | [Activity(Label = "TabIcons.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 14 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 15 | { 16 | protected override void OnCreate(Bundle bundle) 17 | { 18 | TabLayoutResource = Resource.Layout.Tabbar; 19 | ToolbarResource = Resource.Layout.Toolbar; 20 | 21 | base.OnCreate(bundle); 22 | 23 | global::Xamarin.Forms.Forms.Init(this, bundle); 24 | 25 | LoadApplication(new App()); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Location Updates 4 | Latitude 5 | Longitude 6 | Last location update time 7 | 8 | Start updates 9 | Stop updates 10 | 11 | 12 | The location settings on the device are not 13 | adequate to run this sample. Fix in Settings. 14 | 15 | 16 | Location permission is needed for core functionality 17 | 18 | Permission was denied, but is needed for core 19 | functionality. 20 | 21 | Settings 22 | 23 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/TabIcons.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {AF5F6DFA-1336-489A-A89D-6AFF6630EE18} 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle("TabIcons.Droid")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 James Montemagno 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("BlankAppCompat")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("BlankAppCompat")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/MyTabs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TabIcons.Interfaces; 3 | using TabIcons.ViewModel; 4 | using Xamarin.Forms; 5 | namespace TabIcons 6 | { 7 | public class MyTabs : TabbedPage 8 | { 9 | 10 | public event EventHandler UpdateIcons; 11 | 12 | Page currentPage; 13 | public MyTabs() 14 | { 15 | Children.Add(new TabIconsPage() 16 | { 17 | 18 | }); 19 | 20 | Children.Add(new TabIconsPage2() 21 | { 22 | 23 | }); 24 | 25 | currentPage = Children[0]; 26 | 27 | this.CurrentPageChanged += Handle_CurrentPageChanged; 28 | 29 | } 30 | 31 | void Handle_CurrentPageChanged(object sender, EventArgs e) 32 | { 33 | var currentBinding = currentPage.BindingContext as IIconChange; 34 | if (currentBinding != null) 35 | currentBinding.IsSelected = false; 36 | 37 | currentPage = CurrentPage; 38 | currentBinding = currentPage.BindingContext as IIconChange; 39 | if (currentBinding != null) 40 | currentBinding.IsSelected = true; 41 | 42 | UpdateIcons?.Invoke(this, EventArgs.Empty); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | TabIcons 7 | CFBundleName 8 | TabIcons 9 | CFBundleIdentifier 10 | com.refractored.tabicons 11 | CFBundleShortVersionString 12 | 1.0 13 | CFBundleVersion 14 | 1.0 15 | LSRequiresIPhoneOS 16 | 17 | MinimumOSVersion 18 | 8.0 19 | UIDeviceFamily 20 | 21 | 1 22 | 2 23 | 24 | UILaunchStoryboardName 25 | LaunchScreen 26 | UIRequiredDeviceCapabilities 27 | 28 | armv7 29 | 30 | UISupportedInterfaceOrientations 31 | 32 | UIInterfaceOrientationPortrait 33 | UIInterfaceOrientationLandscapeLeft 34 | UIInterfaceOrientationLandscapeRight 35 | 36 | UISupportedInterfaceOrientations~ipad 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationPortraitUpsideDown 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | XSAppIconAssets 44 | Assets.xcassets/AppIcon.appiconset 45 | 46 | 47 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26730.8 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocationUpdates", "LocationUpdates\LocationUpdates.csproj", "{E033292C-1101-44F4-867D-083EF8DB215F}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5B10D3B1-5E45-46D6-A30A-DBDDDF9918BA}" 9 | ProjectSection(SolutionItems) = preProject 10 | Readme.md = Readme.md 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {E033292C-1101-44F4-867D-083EF8DB215F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {E033292C-1101-44F4-867D-083EF8DB215F}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {E033292C-1101-44F4-867D-083EF8DB215F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 22 | {E033292C-1101-44F4-867D-083EF8DB215F}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {E033292C-1101-44F4-867D-083EF8DB215F}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {E033292C-1101-44F4-867D-083EF8DB215F}.Release|Any CPU.Deploy.0 = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | GlobalSection(ExtensibilityGlobals) = postSolution 30 | SolutionGuid = {BFE3DB44-2C35-440A-830D-4455F14801F6} 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/TabIcons/TabIcons.projitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {AF5F6DFA-1336-489A-A89D-6AFF6630EE18} 7 | 8 | 9 | TabIcons 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | App.xaml 19 | 20 | 21 | TabIconsPage.xaml 22 | 23 | 24 | 25 | 26 | 27 | 28 | TabIconsPage2.xaml 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/MainApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.OS; 5 | using Android.Runtime; 6 | using Plugin.CurrentActivity; 7 | 8 | namespace LocationUpdates 9 | { 10 | //You can specify additional application information in this attribute 11 | [Application] 12 | public class MainApplication : Application, Application.IActivityLifecycleCallbacks 13 | { 14 | public MainApplication(IntPtr handle, JniHandleOwnership transer) 15 | :base(handle, transer) 16 | { 17 | } 18 | 19 | public override void OnCreate() 20 | { 21 | base.OnCreate(); 22 | RegisterActivityLifecycleCallbacks(this); 23 | } 24 | 25 | public override void OnTerminate() 26 | { 27 | base.OnTerminate(); 28 | UnregisterActivityLifecycleCallbacks(this); 29 | } 30 | 31 | public void OnActivityCreated(Activity activity, Bundle savedInstanceState) 32 | { 33 | CrossCurrentActivity.Current.Activity = activity; 34 | } 35 | 36 | public void OnActivityDestroyed(Activity activity) 37 | { 38 | } 39 | 40 | public void OnActivityPaused(Activity activity) 41 | { 42 | } 43 | 44 | public void OnActivityResumed(Activity activity) 45 | { 46 | CrossCurrentActivity.Current.Activity = activity; 47 | } 48 | 49 | public void OnActivitySaveInstanceState(Activity activity, Bundle outState) 50 | { 51 | } 52 | 53 | public void OnActivityStarted(Activity activity) 54 | { 55 | CrossCurrentActivity.Current.Activity = activity; 56 | } 57 | 58 | public void OnActivityStopped(Activity activity) 59 | { 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /DynamicallyChangeTabIcons/Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. -------------------------------------------------------------------------------- /GooglePlayLocationAPIs/LocationUpdates/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 31 | 32 | 38 |