Skip to content

Commit

Permalink
Release: Parte 1, Parte 2 e Parte 3 (Migrando para NavigationService,…
Browse files Browse the repository at this point in the history
… implementando MvvM, Bonus Track)
  • Loading branch information
balivo committed May 29, 2018
1 parent 9f28030 commit eb46fbc
Show file tree
Hide file tree
Showing 332 changed files with 44,011 additions and 0 deletions.
143 changes: 143 additions & 0 deletions src/parte-01/VanillaNav/VanillaNav.sln
@@ -0,0 +1,143 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2018
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VanillaNav.Android", "VanillaNav\VanillaNav.Android\VanillaNav.Android.csproj", "{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VanillaNav.iOS", "VanillaNav\VanillaNav.iOS\VanillaNav.iOS.csproj", "{F548B517-06CC-4691-9F71-9F35BE96B782}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VanillaNav", "VanillaNav\VanillaNav\VanillaNav.csproj", "{0663F5D1-AF9C-4757-AC63-FF146BA1F359}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Ad-Hoc|iPhone = Ad-Hoc|iPhone
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
AppStore|Any CPU = AppStore|Any CPU
AppStore|iPhone = AppStore|iPhone
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
Debug|Any CPU = Debug|Any CPU
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|Any CPU = Release|Any CPU
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|Any CPU.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|iPhone.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|iPhone.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|iPhone.Build.0 = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|Any CPU.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|Any CPU.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|iPhone.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|iPhone.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|iPhone.Deploy.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{6E7AA85D-5018-4BF1-90A4-D1EA7525C785}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|Any CPU.Build.0 = Ad-Hoc|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|Any CPU.Deploy.0 = Ad-Hoc|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|iPhone.Deploy.0 = Ad-Hoc|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Ad-Hoc|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|Any CPU.Build.0 = AppStore|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|Any CPU.Deploy.0 = AppStore|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|iPhone.Build.0 = AppStore|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|iPhone.Deploy.0 = AppStore|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.AppStore|iPhoneSimulator.Deploy.0 = AppStore|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|Any CPU.Deploy.0 = Debug|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|iPhone.ActiveCfg = Debug|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|iPhone.Build.0 = Debug|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|iPhone.Deploy.0 = Debug|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Debug|iPhoneSimulator.Deploy.0 = Debug|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|Any CPU.ActiveCfg = Release|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|Any CPU.Build.0 = Release|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|Any CPU.Deploy.0 = Release|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|iPhone.ActiveCfg = Release|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|iPhone.Build.0 = Release|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|iPhone.Deploy.0 = Release|iPhone
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{F548B517-06CC-4691-9F71-9F35BE96B782}.Release|iPhoneSimulator.Deploy.0 = Release|iPhoneSimulator
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|Any CPU.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|iPhone.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|Any CPU.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|iPhone.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|iPhone.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.AppStore|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|iPhone.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|Any CPU.Build.0 = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|Any CPU.Deploy.0 = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|iPhone.ActiveCfg = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|iPhone.Build.0 = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|iPhone.Deploy.0 = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{0663F5D1-AF9C-4757-AC63-FF146BA1F359}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C742F6E5-145E-4B26-B85A-B7BDAB6370E4}
EndGlobalSection
EndGlobal
@@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".

These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:

public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

InputStream input = Assets.Open ("my_asset.txt");
}
}

Additionally, some Android functions will automatically load asset files:

Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
@@ -0,0 +1,27 @@
using System;

using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

namespace VanillaNav.Droid
{
[Activity(Label = "VanillaNav", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

base.OnCreate(bundle);

global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
}
}

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.VanillaNav">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27" />
<application android:label="VanillaNav.Android"></application>
</manifest>
@@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VanillaNav.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VanillaNav.Android")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
@@ -0,0 +1,50 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.

For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:

Resources/
drawable-hdpi/
icon.png

drawable-ldpi/
icon.png

drawable-mdpi/
icon.png

layout/
main.xml

values/
strings.xml

In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:

public class Resource {
public class drawable {
public const int icon = 0x123;
}

public class layout {
public const int main = 0x456;
}

public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}

You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

0 comments on commit eb46fbc

Please sign in to comment.