2 pages with search and some basic styling

This commit is contained in:
David Ortinau 2018-06-21 09:41:12 -05:00
Коммит a613f9fbe3
60 изменённых файлов: 10916 добавлений и 0 удалений

41
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,41 @@
# Autosave files
*~
# build
[Oo]bj/
[Bb]in/
packages/
TestResults/
# globs
Makefile.in
*.DS_Store
*.sln.cache
*.suo
*.cache
*.pidb
*.userprefs
*.usertasks
config.log
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.user
*.tar.gz
tarballs/
test-results/
Thumbs.db
.vs/
# Mac bundle stuff
*.dmg
*.app
# resharper
*_Resharper.*
*.Resharper
# dotCover
*.dotCover

Просмотреть файл

@ -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,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{375010A4-6FE3-4AAF-B14D-60786BB4425D}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>Gastropod.Droid</RootNamespace>
<AssemblyName>Gastropod.Android</AssemblyName>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.Design" Version="27.*" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.*" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="27.*" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="27.*" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="27.*" />
<PackageReference Include="Xamarin.Forms">
<Version>3.2.0.598293</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
<Folder Include="Resources\drawable-hdpi\" />
<Folder Include="Resources\drawable-xhdpi\" />
<Folder Include="Resources\drawable-xxhdpi\" />
<Folder Include="Resources\drawable-xxxhdpi\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Gastropod\Gastropod.csproj">
<Project>{63013D27-0BD5-4AB9-9A9B-E77567753487}</Project>
<Name>Gastropod</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

Просмотреть файл

@ -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 Gastropod.Droid
{
[Activity(Label = "Gastropod", 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,6 @@
<?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.xamarin.Gastropod">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27" />
<application android:label="Gastropod.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("Gastropod.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Gastropod.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.

9552
Gastropod.Android/Resources/Resource.designer.cs сгенерированный Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:tabIndicatorColor="@android:color/white" app:tabGravity="fill" app:tabMode="fixed" />

Просмотреть файл

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Двоичные данные
Gastropod.Android/Resources/mipmap-hdpi/Icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-hdpi/launcher_foreground.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-mdpi/icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-mdpi/launcher_foreground.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.3 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-xhdpi/Icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.9 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-xhdpi/launcher_foreground.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-xxhdpi/Icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-xxhdpi/launcher_foreground.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 33 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-xxxhdpi/Icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 19 KiB

Двоичные данные
Gastropod.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 51 KiB

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="launcher_background">#FFFFFF</color>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#2196F3</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#1976D2</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#FF4081</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
</resources>

Просмотреть файл

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace Gastropod.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
}

Просмотреть файл

@ -0,0 +1,116 @@
{
"images": [
{
"scale": "2x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon40.png"
},
{
"scale": "3x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon60.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon58.png"
},
{
"scale": "3x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon87.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon80.png"
},
{
"scale": "3x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "2x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "3x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon180.png"
},
{
"scale": "1x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon20.png"
},
{
"scale": "2x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "1x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon29.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon58.png"
},
{
"scale": "1x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon80.png"
},
{
"scale": "1x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon76.png"
},
{
"scale": "2x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon152.png"
},
{
"scale": "2x",
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon167.png"
},
{
"scale": "1x",
"size": "1024x1024",
"idiom": "ios-marketing"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.7 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.1 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 845 B

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичные данные
Gastropod.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8E2736E4-A040-426B-87BD-464D2D47F034}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{6143fdea-f3c2-4a09-aafa-6e230626515e}</TemplateGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Gastropod.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>Gastropod.iOS</AssemblyName>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>x86_64</MtouchArch>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchArch>ARM64</MtouchArch>
<BuildIpa>True</BuildIpa>
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\AppStore</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchArch>ARM64</MtouchArch>
<CodesignProvision>Automatic:AppStore</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<None Include="Entitlements.plist" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon180.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon167.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon152.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon120.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon87.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon80.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon76.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon60.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon58.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon40.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon29.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon20.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>3.2.0.598293</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\Gastropod\Gastropod.csproj">
<Project>{63013D27-0BD5-4AB9-9A9B-E77567753487}</Project>
<Name>Gastropod</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\3bar.png" />
<BundleResource Include="Resources\3bar%402x.png" />
<BundleResource Include="Resources\Icon-60%402x.png" />
<BundleResource Include="Resources\Icon-60%403x.png" />
</ItemGroup>
</Project>

38
Gastropod.iOS/Info.plist Normal file
Просмотреть файл

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>Gastropod</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.Gastropod</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>Gastropod</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>

20
Gastropod.iOS/Main.cs Normal file
Просмотреть файл

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace Gastropod.iOS
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
}
}
}

Просмотреть файл

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("Gastropod.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Gastropod.iOS")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
// 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")]

Двоичные данные
Gastropod.iOS/Resources/3bar.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 205 B

Двоичные данные
Gastropod.iOS/Resources/3bar@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 263 B

Двоичные данные
Gastropod.iOS/Resources/Icon-60@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичные данные
Gastropod.iOS/Resources/Icon-60@3x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 21 KiB

Просмотреть файл

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="gAE-YM-kbH">
<objects>
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="270" y="270" width="60" height="60"/>
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="349" y="339"/>
</scene>
</scenes>
<resources>
<image name="Icon-60.png" width="60" height="60"/>
</resources>
</document>

71
Gastropod.sln Normal file
Просмотреть файл

@ -0,0 +1,71 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gastropod.Android", "Gastropod.Android\Gastropod.Android.csproj", "{375010A4-6FE3-4AAF-B14D-60786BB4425D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gastropod.iOS", "Gastropod.iOS\Gastropod.iOS.csproj", "{8E2736E4-A040-426B-87BD-464D2D47F034}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gastropod", "Gastropod\Gastropod.csproj", "{63013D27-0BD5-4AB9-9A9B-E77567753487}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
Ad-Hoc|iPhone = Ad-Hoc|iPhone
AppStore|iPhone = AppStore|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Release|Any CPU.Build.0 = Release|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Debug|iPhone.Build.0 = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Release|iPhone.ActiveCfg = Release|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Release|iPhone.Build.0 = Release|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{375010A4-6FE3-4AAF-B14D-60786BB4425D}.AppStore|iPhone.Build.0 = Debug|Any CPU
{8E2736E4-A040-426B-87BD-464D2D47F034}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{8E2736E4-A040-426B-87BD-464D2D47F034}.Debug|iPhone.ActiveCfg = Debug|iPhone
{8E2736E4-A040-426B-87BD-464D2D47F034}.Debug|iPhone.Build.0 = Debug|iPhone
{8E2736E4-A040-426B-87BD-464D2D47F034}.Release|iPhone.ActiveCfg = Release|iPhone
{8E2736E4-A040-426B-87BD-464D2D47F034}.Release|iPhone.Build.0 = Release|iPhone
{8E2736E4-A040-426B-87BD-464D2D47F034}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{8E2736E4-A040-426B-87BD-464D2D47F034}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{8E2736E4-A040-426B-87BD-464D2D47F034}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{8E2736E4-A040-426B-87BD-464D2D47F034}.AppStore|iPhone.Build.0 = AppStore|iPhone
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Release|Any CPU.Build.0 = Release|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Debug|iPhone.Build.0 = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Release|iPhone.ActiveCfg = Release|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Release|iPhone.Build.0 = Release|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{63013D27-0BD5-4AB9-9A9B-E77567753487}.AppStore|iPhone.Build.0 = Debug|Any CPU
EndGlobalSection
EndGlobal

5
Gastropod/App.xaml Normal file
Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Gastropod.App">
<Application.Resources>
</Application.Resources>
</Application>

146
Gastropod/App.xaml.cs Normal file
Просмотреть файл

@ -0,0 +1,146 @@
using System.Collections.ObjectModel;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace Gastropod
{
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new Gastropod.Shell();
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
public static ObservableCollection<Seashell> Seashells = new ObservableCollection<Seashell>{
new Seashell {
Text = "Auger"
},
new Seashell {
Text = "Abalone"
},
new Seashell {
Text = "Babylon"
},
new Seashell {
Text = "Bonnet"
},
new Seashell {
Text = "Clam"
},
new Seashell {
Text = "Conch"
},
new Seashell {
Text = "Cone"
},
new Seashell {
Text = "Cowrie"
},
new Seashell {
Text = "Drupe"
},
new Seashell {
Text = "Egg"
},
new Seashell {
Text = "Fig"
},
new Seashell {
Text = "Frog"
},
new Seashell {
Text = "Harp"
},
new Seashell {
Text = "Helmet"
},
new Seashell {
Text = "Land Snail"
},
new Seashell {
Text = "Limpet"
},
new Seashell {
Text = "Melon"
},
new Seashell {
Text = "Melongina"
},
new Seashell {
Text = "Mitre"
},
new Seashell {
Text = "Moon Shells"
},
new Seashell {
Text = "Murex"
},
new Seashell {
Text = "Nassa"
},
new Seashell {
Text = "Nautilus"
},
new Seashell {
Text = "Olive"
},
new Seashell {
Text = "Operculum"
},
new Seashell {
Text = "Scallop"
},
new Seashell {
Text = "Spindle"
},
new Seashell {
Text = "Strombus"
},
new Seashell {
Text = "Sundial"
},
new Seashell {
Text = "Tibia"
},
new Seashell {
Text = "Tonna"
},
new Seashell {
Text = "Top"
},
new Seashell {
Text = "Triton"
},
new Seashell {
Text = "Turritella"
},
new Seashell {
Text = "Turbo"
},
new Seashell {
Text = "Umbonium"
},
new Seashell {
Text = "Volute"
}
};
}
}

19
Gastropod/FeedPage.xaml Normal file
Просмотреть файл

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Gastropod.FeedPage">
<ContentPage.Content>
<StackLayout>
<ListView x:Name="ItemsListView" ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand" HasUnevenRows="true">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="10">
<Label Text="{Binding Text}" LineBreakMode="NoWrap" Style="{DynamicResource ListItemTextStyle}" FontSize="16" />
<Label Text="{Binding Description}" LineBreakMode="NoWrap" Style="{DynamicResource ListItemDetailTextStyle}" FontSize="13" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage.Content>
</ContentPage>

Просмотреть файл

@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Xamarin.Forms;
namespace Gastropod
{
public partial class FeedPage : ContentPage
{
public ObservableCollection<Seashell> Items { get; set; }
public FeedPage()
{
InitializeComponent();
Shell.SetSearchHandler(this, new FeedSearchHandler());
Items = App.Seashells;
BindingContext = this;
}
}
public class FeedSearchHandler : SearchHandler
{
public FeedSearchHandler()
{
SearchBoxVisibility = SearchBoxVisiblity.Expanded;
IsSearchEnabled = true;
ShowsResults = true;
Placeholder = "Find a seashell...";
}
protected override void OnQueryChanged(string oldValue, string newValue)
{
base.OnQueryChanged(oldValue, newValue);
if (string.IsNullOrEmpty(newValue))
{
ItemsSource = null;
}
else
{
var results = new List<string>();
results = App.Seashells.Where(x => x.Text.IndexOf(newValue, StringComparison.InvariantCultureIgnoreCase) > -1).Select(x => x.Text).ToList<string>();
ItemsSource = results;
}
}
}
public class Seashell
{
public string Text { get; set; }
public string Description { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.2.0.598293" />
</ItemGroup>
<ItemGroup>
<Compile Remove="FlyoutHeader.xaml.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="FlyoutHeader.xaml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Styles\" />
</ItemGroup>
</Project>

7
Gastropod/MainPage.xaml Normal file
Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Gastropod" x:Class="Gastropod.MainPage">
<StackLayout>
<!-- Place new controls here -->
<Label Text="Home Page" HorizontalOptions="Center" VerticalOptions="CenterAndExpand" />
</StackLayout>
</ContentPage>

Просмотреть файл

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Gastropod
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
}
}

23
Gastropod/Shell.xaml Normal file
Просмотреть файл

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Gastropod"
Route="gastropod"
RouteHost="www.xamarin.com"
RouteScheme="http"
Title="Gastropods"
x:Class="Gastropod.Shell">
<Shell.Resources>
<ResourceDictionary Source="Styles/Global.xaml"/>
</Shell.Resources>
<Shell.FlyoutHeader>
<ContentView HeightRequest="300" BackgroundColor="#3498DB">
<Label Text="Gastropods" TextColor="White" FontSize="48" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/>
</ContentView>
</Shell.FlyoutHeader>
<ShellContent Route="home" Title="Home" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Route="feed" Title="Feed" ContentTemplate="{DataTemplate local:FeedPage}" Style="{StaticResource GreenShell}"/>
</Shell>

17
Gastropod/Shell.xaml.cs Normal file
Просмотреть файл

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace Gastropod
{
public partial class Shell : Xamarin.Forms.Shell
{
public Shell()
{
InitializeComponent();
//CurrentItem = _home;
}
}
}

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xaml-comp compile="true" ?>
<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.ShellBackgroundColor" Value="#3498DB" />
<Setter Property="Shell.ShellForegroundColor" Value="White" />
<Setter Property="Shell.ShellTitleColor" Value="White" />
<Setter Property="Shell.ShellDisabledColor" Value="#B4FFFFFF" />
<Setter Property="Shell.ShellUnselectedColor" Value="#95FFFFFF" />
</Style>
<Style TargetType="ShellItem" BasedOn="{StaticResource BaseStyle}" />
<Style x:Key="GreenShell" TargetType="Element" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Shell.ShellBackgroundColor" Value="Green" />
</Style>
</ResourceDictionary>

192
readme.md Normal file
Просмотреть файл

@ -0,0 +1,192 @@
# Guide: Getting Started With Shell (Early Preview)
Shell is a new container for your Xamarin.Forms applications that provides several key benefits.
- Beautifully themed UI by default, beginning with Material Design
- Modern navigation UI out-of-the-box via a Flyout control
- Navigate via routes
- Performance!
- Unified design by default (not yet implemented)
# Pre-requisites
## Preview NuGet
We have posted a preview of Xamarin.Forms that includes a very early preview of Shell. [Download the packages here](https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_apis/build/builds/1794617/artifacts?artifactName=NuGet&api-version=5.0-preview.3&%24format=zip) and add them to your local NuGet source.
## Limitations
Android and iOS are the most complete platforms. UWP is in progress. No other platforms are part of the initial release plan.
# Getting Started
Add a new XAML file call `Shell.xaml`. Replace the `ContentPage` with this sample code:
> Note to change your application namespace from Gastropod to your own app name.
```
<?xml version="1.0" encoding="utf-8" ?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Gastropod"
Route="gastropod"
RouteHost="www.xamarin.com"
RouteScheme="http"
x:Class="Gastropod.Shell">
<Shell.FlyoutHeader>
<local:FlyoutHeader />
</Shell.FlyoutHeader>
</Shell>
```
Open `Shell.xaml.cs` and updated it to extend `Shell` instead of `ContentPage`.
```
public partial class Shell : Xamarin.Forms.Shell
```
Open `App.xaml.cs` and assign your new `Shell` to `MainPage`.
```
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new Shell();
}
}
```
For several examples of creating different app variations, see the original [GitHub issue](https://github.com/xamarin/Xamarin.Forms/issues/2415).
- Single page
- 2 page with tabs
- 2 page with top and bottom tabs
- 2 page with flyout menu
## Definitions
| Term | Definition |
|--------------------|---------------------------|
| Flyout | The menu for the application accessible via the hamburger button or swiping off the side. The behavior of the `Flyout` is set via the `FlyoutBehavior` on the `Shell` itself. |
| FlyoutHeader | The template for content that appears at the top of the `Flyout`. |
| MenuItem | A menu item to appear in the Flyout when a `ShellContent` is the presented page. |
| Route | The URI segment used to navigate within the app to this page. |
| Shell | The top level container of your appication. All children are `ShellItem`s. |
| ShellContent | The `Shell` representation of a `ContentPage`. |
| ShellItem | Represents a top level section of your application. You can have 1 or more. By default these populate the `Flyout`. `ShellItem`s contain `ShellSection`s. |
| ShellSection | A grouping of `ShellContent` within a `ShellItem`. |
Here is an example of a 2 page app with tabs at the bottom:
```
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MyStore"
FlyoutBehavior="Disabled"
x:Class="MyStore.Shell">
<ShellItem>
<ShellSection Title="Home" Icon="home.png">
<ShellContent>
<local:HomePage />
</ShellContent>
</ShellSection>
<ShellSection Title="Notifications" Icon="bell.png">
<ShellContent>
<local:NotificationsPage />
</ShellContent>
</ShellSection>
</ShellItem>
</Shell>
```
## Adding Pages
Each page or screen in a `Shell` app is represented by a `ShellContent`. The `ContentPage` is set via a `DataTemplate` to prevent the pages from being instantiated until they are required
```
<ShellContent Route="home" Title="Home" ContentTemplate="{DataTemplate local:MainPage}"/>
<ShellContent Route="feed" Title="Feed" ContentTemplate="{DataTemplate local:FeedPage}"/>
```
This could also be represented as:
```
<ShellContent Route="home" Title="Home">
<local:MainPage />
</ShellContent>
<ShellContent Route="feed" Title="Feed">
<local:FeedPage />
</ShellContent>
```
## Navigation Routes
Navigation through a `Shell` application is handled via URIs. From the example above, the 2 pages are navigable via different routes, "home" and "feed". By simply naming the routes, Xamarin.Forms can handle all the navigation for you.
`[Shell.RouteScheme]://[Shell.RouteHost]/[Shell]/[ShellItem]/[ShellSection]/[ShellContent]/[NavStack1]/[NavStack2]`
## A More Advanced Example
The Xamarin.Forms [shell branch](https://github.com/xamarin/Xamarin.Forms/blob/shell/Xamarin.Forms.Controls/XamStore/StoreShell.xaml) includes a working replica of the Google Play Store navigation model, and then some.
## Design and Styling
`Shell` and related items can be styled like any other Xamarin.Forms control.
```
<Shell.Resources>
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.ShellBackgroundColor" Value="#455A64" />
<Setter Property="Shell.ShellForegroundColor" Value="White" />
<Setter Property="Shell.ShellTitleColor" Value="White" />
<Setter Property="Shell.ShellDisabledColor" Value="#B4FFFFFF" />
<Setter Property="Shell.ShellUnselectedColor" Value="#95FFFFFF" />
</Style>
<Style TargetType="ShellItem" BasedOn="{StaticResource BaseStyle}" />
<Style x:Key="GreenShell" TargetType="Element" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Shell.ShellBackgroundColor" Value="#689F39" />
</Style>
<Style x:Key="MusicShell" TargetType="Element" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Shell.ShellBackgroundColor" Value="#EF6C00" />
</Style>
<Style x:Key="MoviesShell" TargetType="Element" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Shell.ShellBackgroundColor" Value="#ED3B3B" />
</Style>
<Style x:Key="BooksShell" TargetType="Element" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Shell.ShellBackgroundColor" Value="#039BE6" />
</Style>
<Style x:Key="NewsShell" TargetType="Element" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Shell.ShellBackgroundColor" Value="#546DFE" />
</Style>
</Shell.Resources>
```
At this time `Shell` is implementing [Material Design](https://material.io/). Some Material appearance options are available to you now:
```
<ShellItem.ShellAppearance>
<MaterialShellAppearance NavBarCollapseStyle="Full" TabBarCollapseStyle="Full" UseSwipeGesture="false">
</ShellItem.ShellAppearance>
```
In the future we'll be adding an iOS themed Shell, and a Xamarin Shell where iOS and Android adhere to their platform themes by default.
> NOTE! Until we implement the full extent of the [Drawing spec](https://github.com/xamarin/Xamarin.Forms/issues/2452), the design of controls will still be rooted in the native UI tool kit for each platform. Drawing aims to provide an optional path to easily achieving the same UI design across multiple platforms.
# We Want Your Feedback!
After you have some time to explore `Shell` and take a run at various scenarios, please take a few minutes to complete this survey.
[Take the Survey (coming soon)](#tbd)
Find something that isn't working? Could be it's not yet implemented, but [file an issue](https://github.com/xamarin/Xamarin.Forms/issues/new) nevertheless. Prefix the title with `[Shell]` please.