├── 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 |
39 |
40 |
--------------------------------------------------------------------------------
/GooglePlayLocationAPIs/LocationUpdates/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DynamicallyChangeTabIcons/Droid/MyTabsRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using Android.Support.Design.Widget;
5 | using TabIcons;
6 | using TabIcons.Droid;
7 | using TabIcons.Interfaces;
8 | using Xamarin.Forms;
9 | using Xamarin.Forms.Platform.Android;
10 | using Xamarin.Forms.Platform.Android.AppCompat;
11 | [assembly: ExportRenderer(typeof(MyTabs), typeof(MyTabsRenderer))]
12 | namespace TabIcons.Droid
13 | {
14 | public class MyTabsRenderer : TabbedPageRenderer
15 | {
16 | bool setup;
17 | TabLayout layout;
18 | public MyTabsRenderer()
19 | {
20 | }
21 |
22 | protected override void OnElementChanged(ElementChangedEventArgs e)
23 | {
24 | base.OnElementChanged(e);
25 | if(Element != null)
26 | {
27 | ((MyTabs)Element).UpdateIcons += Handle_UpdateIcons;
28 | }
29 | }
30 |
31 | protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
32 | {
33 | base.OnElementPropertyChanged(sender, e);
34 |
35 |
36 | if (layout == null && e.PropertyName == "Renderer")
37 | {
38 | layout = (TabLayout)ViewGroup.GetChildAt(1);
39 | }
40 | }
41 |
42 | void Handle_UpdateIcons(object sender, EventArgs e)
43 | {
44 | TabLayout tabs = layout;
45 |
46 | if (tabs == null)
47 | return;
48 |
49 | for (var i = 0; i < Element.Children.Count; i++)
50 | {
51 | var child = Element.Children[i].BindingContext as IIconChange;
52 | var icon = child.CurrentIcon;
53 | if (string.IsNullOrEmpty(icon))
54 | continue;
55 |
56 | TabLayout.Tab tab = tabs.GetTabAt(i);
57 | SetCurrentTabIcon(tab, icon);
58 | }
59 | }
60 |
61 | void SetCurrentTabIcon(TabLayout.Tab tab, string icon)
62 | {
63 | tab.SetIcon(IdFromTitle(icon, ResourceManager.DrawableClass));
64 | }
65 |
66 | int IdFromTitle(string title, Type type)
67 | {
68 | string name = Path.GetFileNameWithoutExtension(title);
69 | int id = GetId(type, name);
70 | return id;
71 | }
72 |
73 | int GetId(Type type, string memberName)
74 | {
75 | object value = type.GetFields().FirstOrDefault(p => p.Name == memberName)?.GetValue(type)
76 | ?? type.GetProperties().FirstOrDefault(p => p.Name == memberName)?.GetValue(type);
77 | if (value is int)
78 | return (int)value;
79 | return 0;
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/DynamicallyChangeTabIcons/TabIcons.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TabIcons", "TabIcons\TabIcons.shproj", "{AF5F6DFA-1336-489A-A89D-6AFF6630EE18}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabIcons.iOS", "iOS\TabIcons.iOS.csproj", "{8567B5C7-CBF2-443B-A195-99D2518034B7}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabIcons.Droid", "Droid\TabIcons.Droid.csproj", "{66ADAB58-66A5-4296-BB0A-C63176114822}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
13 | Release|iPhone = Release|iPhone
14 | Release|iPhoneSimulator = Release|iPhoneSimulator
15 | Debug|iPhone = Debug|iPhone
16 | Debug|Any CPU = Debug|Any CPU
17 | Release|Any CPU = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
21 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
22 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Release|iPhone.ActiveCfg = Release|iPhone
23 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Release|iPhone.Build.0 = Release|iPhone
24 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
25 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
26 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Debug|iPhone.ActiveCfg = Debug|iPhone
27 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Debug|iPhone.Build.0 = Debug|iPhone
28 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
29 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
30 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Release|Any CPU.ActiveCfg = Release|iPhone
31 | {8567B5C7-CBF2-443B-A195-99D2518034B7}.Release|Any CPU.Build.0 = Release|iPhone
32 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
33 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
34 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Release|iPhone.ActiveCfg = Release|Any CPU
35 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Release|iPhone.Build.0 = Release|Any CPU
36 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
37 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
38 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Debug|iPhone.ActiveCfg = Debug|Any CPU
39 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Debug|iPhone.Build.0 = Debug|Any CPU
40 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Debug|Any CPU.Build.0 = Debug|Any CPU
42 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 | {66ADAB58-66A5-4296-BB0A-C63176114822}.Release|Any CPU.Build.0 = Release|Any CPU
44 | EndGlobalSection
45 | EndGlobal
46 |
--------------------------------------------------------------------------------
/DynamicallyChangeTabIcons/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "idiom": "iphone",
5 | "size": "29x29",
6 | "scale": "1x"
7 | },
8 | {
9 | "idiom": "iphone",
10 | "size": "29x29",
11 | "scale": "2x"
12 | },
13 | {
14 | "idiom": "iphone",
15 | "size": "29x29",
16 | "scale": "3x"
17 | },
18 | {
19 | "idiom": "iphone",
20 | "size": "40x40",
21 | "scale": "2x"
22 | },
23 | {
24 | "idiom": "iphone",
25 | "size": "40x40",
26 | "scale": "3x"
27 | },
28 | {
29 | "idiom": "iphone",
30 | "size": "57x57",
31 | "scale": "1x"
32 | },
33 | {
34 | "idiom": "iphone",
35 | "size": "57x57",
36 | "scale": "2x"
37 | },
38 | {
39 | "idiom": "iphone",
40 | "size": "60x60",
41 | "scale": "2x"
42 | },
43 | {
44 | "idiom": "iphone",
45 | "size": "60x60",
46 | "scale": "3x"
47 | },
48 | {
49 | "idiom": "ipad",
50 | "size": "29x29",
51 | "scale": "1x"
52 | },
53 | {
54 | "idiom": "ipad",
55 | "size": "29x29",
56 | "scale": "2x"
57 | },
58 | {
59 | "idiom": "ipad",
60 | "size": "40x40",
61 | "scale": "1x"
62 | },
63 | {
64 | "idiom": "ipad",
65 | "size": "40x40",
66 | "scale": "2x"
67 | },
68 | {
69 | "idiom": "ipad",
70 | "size": "50x50",
71 | "scale": "1x"
72 | },
73 | {
74 | "idiom": "ipad",
75 | "size": "50x50",
76 | "scale": "2x"
77 | },
78 | {
79 | "idiom": "ipad",
80 | "size": "72x72",
81 | "scale": "1x"
82 | },
83 | {
84 | "idiom": "ipad",
85 | "size": "72x72",
86 | "scale": "2x"
87 | },
88 | {
89 | "idiom": "ipad",
90 | "size": "76x76",
91 | "scale": "1x"
92 | },
93 | {
94 | "idiom": "ipad",
95 | "size": "76x76",
96 | "scale": "2x"
97 | },
98 | {
99 | "size": "24x24",
100 | "idiom": "watch",
101 | "scale": "2x",
102 | "role": "notificationCenter",
103 | "subtype": "38mm"
104 | },
105 | {
106 | "size": "27.5x27.5",
107 | "idiom": "watch",
108 | "scale": "2x",
109 | "role": "notificationCenter",
110 | "subtype": "42mm"
111 | },
112 | {
113 | "size": "29x29",
114 | "idiom": "watch",
115 | "role": "companionSettings",
116 | "scale": "2x"
117 | },
118 | {
119 | "size": "29x29",
120 | "idiom": "watch",
121 | "role": "companionSettings",
122 | "scale": "3x"
123 | },
124 | {
125 | "size": "40x40",
126 | "idiom": "watch",
127 | "scale": "2x",
128 | "role": "appLauncher",
129 | "subtype": "38mm"
130 | },
131 | {
132 | "size": "44x44",
133 | "idiom": "watch",
134 | "scale": "2x",
135 | "role": "longLook",
136 | "subtype": "42mm"
137 | },
138 | {
139 | "size": "86x86",
140 | "idiom": "watch",
141 | "scale": "2x",
142 | "role": "quickLook",
143 | "subtype": "38mm"
144 | },
145 | {
146 | "size": "98x98",
147 | "idiom": "watch",
148 | "scale": "2x",
149 | "role": "quickLook",
150 | "subtype": "42mm"
151 | }
152 | ],
153 | "info": {
154 | "version": 1,
155 | "author": "xcode"
156 | }
157 | }
--------------------------------------------------------------------------------
/GooglePlayLocationAPIs/LocationUpdates/Resources/layout/main.axml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
31 |
32 |
37 |
38 |
48 |
49 |
60 |
61 |
62 |
69 |
70 |
77 |
78 |
85 |
86 |
92 |
93 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Suppress: EC112
2 | # top-most EditorConfig file
3 | root = true
4 |
5 | # Don't use tabs for indentation.
6 | [*]
7 | indent_style = tab
8 | # (Please don't specify an indent_size here; that has too many unintended consequences.)
9 |
10 | # Code files
11 | [*.{cs,csx,vb,vbx}]
12 | indent_size = 4
13 |
14 | # Xml project files
15 | [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
16 | indent_size = 2
17 |
18 | # Xml config files
19 | [*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
20 | indent_size = 2
21 |
22 | # JSON files
23 | [*.json]
24 | indent_size = 2
25 |
26 | # Dotnet code style settings:
27 | [*.{cs,vb}]
28 | # Sort using and Import directives with System.* appearing first
29 | dotnet_sort_system_directives_first = false
30 | # Avoid "this." and "Me." if not necessary
31 | dotnet_style_qualification_for_field = false:suggestion
32 | dotnet_style_qualification_for_property = false:suggestion
33 | dotnet_style_qualification_for_method = false:suggestion
34 | dotnet_style_qualification_for_event = false:suggestion
35 |
36 | # Use language keywords instead of framework type names for type references
37 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
38 | dotnet_style_predefined_type_for_member_access = true:suggestion
39 |
40 | # Suggest more modern language features when available
41 | dotnet_style_object_initializer = true:suggestion
42 | dotnet_style_collection_initializer = true:suggestion
43 | dotnet_style_coalesce_expression = true:suggestion
44 | dotnet_style_null_propagation = true:suggestion
45 | dotnet_style_explicit_tuple_names = true:suggestion
46 |
47 | # Naming Conventions:
48 | # Pascal Casing
49 | dotnet_naming_symbols.method_and_property_symbols.applicable_kinds= method,property,enum
50 | dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = *
51 | dotnet_naming_style.pascal_case_style.capitalization = pascal_case
52 |
53 | dotnet_naming_rule.methods_and_properties_must_be_pascal_case.severity = warning
54 | dotnet_naming_rule.methods_and_properties_must_be_pascal_case.symbols = method_and_property_symbols
55 | dotnet_naming_rule.methods_and_properties_must_be_pascal_case.style = pascal_case_style
56 |
57 | # Non-public members must be lower-case
58 | dotnet_naming_symbols.non_public_symbols.applicable_kinds = property,method,field,event,delegate
59 | dotnet_naming_symbols.non_public_symbols.applicable_accessibilities = private
60 | dotnet_naming_style.all_lower_case_style.capitalization = camel_case
61 |
62 | dotnet_naming_rule.non_public_members_must_be_lower_case.severity = warning
63 | dotnet_naming_rule.non_public_members_must_be_lower_case.symbols = non_public_symbols
64 | dotnet_naming_rule.non_public_members_must_be_lower_case.style = all_lower_case_style
65 |
66 | # CSharp code style settings:
67 | [*.cs]
68 | # Do not prefer "var" everywhere
69 | csharp_style_var_for_built_in_types = true:suggestion
70 | csharp_style_var_when_type_is_apparent = true:suggestion
71 | csharp_style_var_elsewhere = true:suggestion
72 |
73 | # Prefer method-like constructs to have a block body
74 | csharp_style_expression_bodied_methods = true:suggestion
75 | csharp_style_expression_bodied_constructors = true:none
76 | csharp_style_expression_bodied_operators = true:none
77 |
78 | # Prefer property-like constructs to have an expression-body
79 | csharp_style_expression_bodied_properties = true:suggestion
80 | csharp_style_expression_bodied_indexers = true:none
81 | csharp_style_expression_bodied_accessors = true:none
82 |
83 | # Suggest more modern language features when available
84 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
85 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
86 | csharp_style_inlined_variable_declaration = true:suggestion
87 | csharp_style_throw_expression = true:suggestion
88 | csharp_style_conditional_delegate_call = true:suggestion
89 |
90 | # Newline settings
91 | csharp_new_line_before_open_brace = all
92 | csharp_new_line_before_else = true
93 | csharp_new_line_before_catch = true
94 | csharp_new_line_before_finally = true
95 | csharp_new_line_before_members_in_object_initializers = true
96 | csharp_new_line_before_members_in_anonymous_types = true
97 |
98 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 |
24 | # Visual Studio 2015 cache/options directory
25 | .vs/
26 | # Uncomment if you have tasks that create the project's static files in wwwroot
27 | #wwwroot/
28 |
29 | # MSTest test Results
30 | [Tt]est[Rr]esult*/
31 | [Bb]uild[Ll]og.*
32 |
33 | # NUNIT
34 | *.VisualState.xml
35 | TestResult.xml
36 |
37 | # Build Results of an ATL Project
38 | [Dd]ebugPS/
39 | [Rr]eleasePS/
40 | dlldata.c
41 |
42 | # DNX
43 | project.lock.json
44 | artifacts/
45 |
46 | *_i.c
47 | *_p.c
48 | *_i.h
49 | *.ilk
50 | *.meta
51 | *.obj
52 | *.pch
53 | *.pdb
54 | *.pgc
55 | *.pgd
56 | *.rsp
57 | *.sbr
58 | *.tlb
59 | *.tli
60 | *.tlh
61 | *.tmp
62 | *.tmp_proj
63 | *.log
64 | *.vspscc
65 | *.vssscc
66 | .builds
67 | *.pidb
68 | *.svclog
69 | *.scc
70 |
71 | # Chutzpah Test files
72 | _Chutzpah*
73 |
74 | # Visual C++ cache files
75 | ipch/
76 | *.aps
77 | *.ncb
78 | *.opendb
79 | *.opensdf
80 | *.sdf
81 | *.cachefile
82 |
83 | # Visual Studio profiler
84 | *.psess
85 | *.vsp
86 | *.vspx
87 | *.sap
88 |
89 | # TFS 2012 Local Workspace
90 | $tf/
91 |
92 | # Guidance Automation Toolkit
93 | *.gpState
94 |
95 | # ReSharper is a .NET coding add-in
96 | _ReSharper*/
97 | *.[Rr]e[Ss]harper
98 | *.DotSettings.user
99 |
100 | # JustCode is a .NET coding add-in
101 | .JustCode
102 |
103 | # TeamCity is a build add-in
104 | _TeamCity*
105 |
106 | # DotCover is a Code Coverage Tool
107 | *.dotCover
108 |
109 | # NCrunch
110 | _NCrunch_*
111 | .*crunch*.local.xml
112 | nCrunchTemp_*
113 |
114 | # MightyMoose
115 | *.mm.*
116 | AutoTest.Net/
117 |
118 | # Web workbench (sass)
119 | .sass-cache/
120 |
121 | # Installshield output folder
122 | [Ee]xpress/
123 |
124 | # DocProject is a documentation generator add-in
125 | DocProject/buildhelp/
126 | DocProject/Help/*.HxT
127 | DocProject/Help/*.HxC
128 | DocProject/Help/*.hhc
129 | DocProject/Help/*.hhk
130 | DocProject/Help/*.hhp
131 | DocProject/Help/Html2
132 | DocProject/Help/html
133 |
134 | # Click-Once directory
135 | publish/
136 |
137 | # Publish Web Output
138 | *.[Pp]ublish.xml
139 | *.azurePubxml
140 | # TODO: Comment the next line if you want to checkin your web deploy settings
141 | # but database connection strings (with potential passwords) will be unencrypted
142 | *.pubxml
143 | *.publishproj
144 |
145 | # NuGet Packages
146 | *.nupkg
147 | # The packages folder can be ignored because of Package Restore
148 | **/packages/*
149 | # except build/, which is used as an MSBuild target.
150 | !**/packages/build/
151 | # Uncomment if necessary however generally it will be regenerated when needed
152 | #!**/packages/repositories.config
153 | # NuGet v3's project.json files produces more ignoreable files
154 | *.nuget.props
155 | *.nuget.targets
156 |
157 | # Microsoft Azure Build Output
158 | csx/
159 | *.build.csdef
160 |
161 | # Microsoft Azure Emulator
162 | ecf/
163 | rcf/
164 |
165 | # Microsoft Azure ApplicationInsights config file
166 | ApplicationInsights.config
167 |
168 | # Windows Store app package directory
169 | AppPackages/
170 | BundleArtifacts/
171 |
172 | # Visual Studio cache files
173 | # files ending in .cache can be ignored
174 | *.[Cc]ache
175 | # but keep track of directories ending in .cache
176 | !*.[Cc]ache/
177 |
178 | # Others
179 | ClientBin/
180 | ~$*
181 | *~
182 | *.dbmdl
183 | *.dbproj.schemaview
184 | *.pfx
185 | *.publishsettings
186 | node_modules/
187 | orleans.codegen.cs
188 |
189 | # RIA/Silverlight projects
190 | Generated_Code/
191 |
192 | # Backup & report files from converting an old project file
193 | # to a newer Visual Studio version. Backup files are not needed,
194 | # because we have git ;-)
195 | _UpgradeReport_Files/
196 | Backup*/
197 | UpgradeLog*.XML
198 | UpgradeLog*.htm
199 |
200 | # SQL Server files
201 | *.mdf
202 | *.ldf
203 |
204 | # Business Intelligence projects
205 | *.rdl.data
206 | *.bim.layout
207 | *.bim_*.settings
208 |
209 | # Microsoft Fakes
210 | FakesAssemblies/
211 |
212 | # GhostDoc plugin setting file
213 | *.GhostDoc.xml
214 |
215 | # Node.js Tools for Visual Studio
216 | .ntvs_analysis.dat
217 |
218 | # Visual Studio 6 build log
219 | *.plg
220 |
221 | # Visual Studio 6 workspace options file
222 | *.opt
223 |
224 | # Visual Studio LightSwitch build output
225 | **/*.HTMLClient/GeneratedArtifacts
226 | **/*.DesktopClient/GeneratedArtifacts
227 | **/*.DesktopClient/ModelManifest.xml
228 | **/*.Server/GeneratedArtifacts
229 | **/*.Server/ModelManifest.xml
230 | _Pvt_Extensions
231 |
232 | # Paket dependency manager
233 | .paket/paket.exe
234 |
235 | # FAKE - F# Make
236 | .fake/
237 |
--------------------------------------------------------------------------------
/DynamicallyChangeTabIcons/iOS/TabIcons.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | {8567B5C7-CBF2-443B-A195-99D2518034B7}
7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Exe
9 | TabIcons.iOS
10 | TabIcons.iOS
11 | Resources
12 |
13 |
14 | true
15 | full
16 | false
17 | bin\iPhoneSimulator\Debug
18 | DEBUG;ENABLE_TEST_CLOUD;
19 | prompt
20 | 4
21 | iPhone Developer
22 | true
23 | true
24 | true
25 | true
26 | 44851
27 | None
28 | i386, x86_64
29 | HttpClientHandler
30 | x86
31 |
32 |
33 | pdbonly
34 | true
35 | bin\iPhone\Release
36 | prompt
37 | 4
38 | iPhone Developer
39 | true
40 | Entitlements.plist
41 | SdkOnly
42 | ARMv7, ARM64
43 | HttpClientHandler
44 | x86
45 |
46 |
47 | pdbonly
48 | true
49 | bin\iPhoneSimulator\Release
50 | prompt
51 | 4
52 | iPhone Developer
53 | true
54 | true
55 | None
56 | i386, x86_64
57 | HttpClientHandler
58 | x86
59 |
60 |
61 | true
62 | full
63 | false
64 | bin\iPhone\Debug
65 | DEBUG;ENABLE_TEST_CLOUD;
66 | prompt
67 | 4
68 | iPhone Developer
69 | true
70 | true
71 | true
72 | true
73 | true
74 | Entitlements.plist
75 | 64410
76 | SdkOnly
77 | ARMv7, ARM64
78 | HttpClientHandler
79 | x86
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | ..\packages\Refractored.MvvmHelpers.1.3.0\lib\netstandard1.0\MvvmHelpers.dll
88 |
89 |
90 | ..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
91 |
92 |
93 | ..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll
94 |
95 |
96 | ..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
97 |
98 |
99 | ..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/GooglePlayLocationAPIs/LocationUpdates/BlankAppCompat.csproj.bak:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {E033292C-1101-44F4-867D-083EF8DB215F}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | BlankAppCompat
13 | BlankAppCompat
14 | 512
15 | true
16 | Resources\Resource.Designer.cs
17 | Off
18 | True
19 | True
20 | Properties\AndroidManifest.xml
21 | v6.0
22 |
23 |
24 |
25 |
26 | true
27 | full
28 | false
29 | bin\Debug\
30 | DEBUG;TRACE
31 | prompt
32 | 4
33 | True
34 | None
35 |
36 |
37 | pdbonly
38 | true
39 | bin\Release\
40 | TRACE
41 | prompt
42 | 4
43 | False
44 | SdkOnly
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.4.0.1\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll
55 | True
56 |
57 |
58 | ..\packages\Xamarin.Android.Support.v4.23.4.0.1\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
59 | True
60 |
61 |
62 | ..\packages\Xamarin.Android.Support.v7.AppCompat.23.4.0.1\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
63 | True
64 |
65 |
66 | ..\packages\Xamarin.Android.Support.Vector.Drawable.23.4.0.1\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll
67 | True
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | AndroidResource
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | Designer
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
117 |
118 |
119 |
120 |
127 |
--------------------------------------------------------------------------------
/DynamicallyChangeTabIcons/Droid/TabIcons.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {66ADAB58-66A5-4296-BB0A-C63176114822}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Library
9 | TabIcons.Droid
10 | TabIcons.Droid
11 | v7.1
12 | True
13 | Resources\Resource.designer.cs
14 | Resource
15 | Properties\AndroidManifest.xml
16 | Resources
17 | Assets
18 | true
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug
25 | DEBUG;
26 | prompt
27 | 4
28 | None
29 |
30 |
31 | true
32 | pdbonly
33 | true
34 | bin\Release
35 | prompt
36 | 4
37 | true
38 | false
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | ..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
47 |
48 |
49 | ..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll
50 |
51 |
52 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll
53 |
54 |
55 | ..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
56 |
57 |
58 | ..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
59 |
60 |
61 | ..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll
62 |
63 |
64 | ..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
65 |
66 |
67 | ..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
68 |
69 |
70 | ..\packages\Refractored.MvvmHelpers.1.3.0\lib\netstandard1.0\MvvmHelpers.dll
71 |
72 |
73 | ..\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\FormsViewGroup.dll
74 |
75 |
76 | ..\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Core.dll
77 |
78 |
79 | ..\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
80 |
81 |
82 | ..\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
83 |
84 |
85 | ..\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/GooglePlayLocationAPIs/LocationUpdates/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.App;
3 | using Android.Content;
4 | using Android.Runtime;
5 | using Android.Views;
6 | using Android.Widget;
7 | using Android.OS;
8 | using Android.Support.V7.App;
9 | using Android.Gms.Location;
10 | using System.Threading.Tasks;
11 | using Android.Locations;
12 | using Plugin.Permissions;
13 | using Plugin.Permissions.Abstractions;
14 | using Android.Support.V4.App;
15 | using Android;
16 | using Android.Support.V4.Content;
17 | using Android.Gms.Common.Apis;
18 | using Debug = System.Diagnostics.Debug;
19 |
20 | namespace LocationUpdates
21 | {
22 | [Activity(Label = "Location Updates",
23 | MainLauncher = true,
24 | LaunchMode = Android.Content.PM.LaunchMode.SingleTop,
25 | Icon = "@drawable/icon")]
26 | public class MainActivity : AppCompatActivity
27 | {
28 | const string KeyRequesting = "requesting-location-updates";
29 | const string KeyLocation = "location";
30 | const string KeyLastUpdated = "last-updated";
31 |
32 | const int UpdateInterval = 10000;
33 | const int FastestUpdateInterval = 5000;
34 |
35 | const int RequestCheckSettings = 0x1;
36 |
37 | TextView latitudeTextView, longitudeTextView, timeTextView;
38 | Button startButton, stopButton;
39 |
40 | bool requestingUpdates;
41 |
42 | FusedLocationProviderClient fusedLocationClient;
43 | SettingsClient settingsClient;
44 | Location currentLocation;
45 | LocationRequest locationRequest;
46 | LocationSettingsRequest locationSettingsRequest;
47 | MyLocationCallback locationCallback;
48 |
49 | string lastUpdateTime = string.Empty;
50 |
51 |
52 | protected override void OnCreate(Bundle bundle)
53 | {
54 | base.OnCreate(bundle);
55 | SetContentView(Resource.Layout.main);
56 | var toolbar = FindViewById(Resource.Id.toolbar);
57 | if (toolbar != null)
58 | {
59 | SetSupportActionBar(toolbar);
60 | SupportActionBar.SetDisplayHomeAsUpEnabled(false);
61 | SupportActionBar.SetHomeButtonEnabled(false);
62 | }
63 |
64 |
65 | startButton = FindViewById