This commit is contained in:
Paul DiPietro 2019-09-06 15:03:00 -04:00
Коммит 0d97260118
75 изменённых файлов: 1291 добавлений и 0 удалений

19
.github/PULL_REQUEST_TEMPLATE.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
## Submission description
_Use this area to describe your submission. Screenshots are appreciated and GIFs (with a hard "g") or video clips will get bonus points!_
### What went well
_This is self-explanatory. Let us know what you liked about using the CarouselView when creating this submission._
### What didn't go well
_What didn't go well, and why? How can we improve it? Please provide as much detail as possible!_
### Missing or desired things
_Fill this with any missing or desired things and how they impact you._
### Anything else
_If we missed anything, feel free to mention it here._

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

@ -0,0 +1,68 @@
bin
obj
classic_bin
classic_obj
*.dll
*.mdb
*.exe
*.log
*.userprefs
*.suo
_docs.xml
UpgradeLog*
docs/*.xml
.nuspec/*.nupkg
*UpgradeReport*
*.user
*.DS_Store
*.ide
.vs
*.designer.cs
*project.lock.json
!*ControlResources*.designer.cs
!*Resources.Designer.cs
!Xamarin.Forms.VSTemplate/**/*.designer.cs
!NuGet.exe
*test-results*
*/PerfLogs/*
*.sap
/packages
!.xamarin-component/**
*.xam
Components/
!GooglePlayServices/**
.irb-history
screenshot_*
!Xamarin.Forms.Addin/libs/**
!Xamarin.Forms.Addin/Packages/Xamarin.Forms.*.nupkg
*.remove
*/.metadata/*
AndroidNative/FormsViewGroup/gen/com/xamarin/formsviewgroup/R.java
AndroidNative/FormsViewGroup/gen/com/xamarin/formsviewgroup/BuildConfig.java
*.psess
TestResults/
Xamarin.Forms.UITest.Validator/UITestCoverage/index.html
!Xamarin.Forms.UITest.TestCloud/test-cloud.exe
Xamarin.Forms.ControlGallery.Windows/AppPackages/
Xamarin.Forms.ControlGallery.WindowsPhone/AppPackages/
Xamarin.Forms.ControlGallery.WindowsUniversal/AppPackages/
Xamarin.Forms.ControlGallery.WindowsUniversal/BundleArtifacts/
Xamarin.Forms.Controls/secrets.txt
Xamarin.Forms.Controls/controlgallery.config
Xamarin.Forms.ControlGallery.Android/Properties/MapsKey.cs
*.tss
*.bak
AndroidNative/local.properties
AndroidNative/FormsViewGroup/build/
AndroidNative/build/
AndroidNative/.gradle/
AndroidNative/gradlew
AndroidNative/gradlew.bat
!EmbeddingTestBeds/Embedding.iOS/*.designer.cs
*.nupkg
*.pdb
# temporary vim files
*.swp
tools/
!tools/mdoc/**/*
caketools/

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

@ -0,0 +1,83 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29209.152
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarouselViewChallenge.Android", "CarouselViewChallenge\CarouselViewChallenge.Android\CarouselViewChallenge.Android.csproj", "{A634DE77-6F68-4579-B55C-9D8C48A02685}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarouselViewChallenge.iOS", "CarouselViewChallenge\CarouselViewChallenge.iOS\CarouselViewChallenge.iOS.csproj", "{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarouselViewChallenge", "CarouselViewChallenge\CarouselViewChallenge\CarouselViewChallenge.csproj", "{A9F8B9B3-719F-4F40-9044-924E7B921409}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
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
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|iPhone.Build.0 = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|Any CPU.Build.0 = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|Any CPU.Deploy.0 = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|iPhone.ActiveCfg = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|iPhone.Build.0 = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|iPhone.Deploy.0 = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{A634DE77-6F68-4579-B55C-9D8C48A02685}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|Any CPU.Deploy.0 = Debug|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|iPhone.ActiveCfg = Debug|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|iPhone.Build.0 = Debug|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|iPhone.Deploy.0 = Debug|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Debug|iPhoneSimulator.Deploy.0 = Debug|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|Any CPU.ActiveCfg = Release|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|Any CPU.Build.0 = Release|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|Any CPU.Deploy.0 = Release|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|iPhone.ActiveCfg = Release|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|iPhone.Build.0 = Release|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|iPhone.Deploy.0 = Release|iPhone
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}.Release|iPhoneSimulator.Deploy.0 = Release|iPhoneSimulator
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|iPhone.Build.0 = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|Any CPU.Build.0 = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|Any CPU.Deploy.0 = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|iPhone.ActiveCfg = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|iPhone.Build.0 = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|iPhone.Deploy.0 = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{A9F8B9B3-719F-4F40-9044-924E7B921409}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {65458068-1955-4495-8B1B-E047791B91CB}
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 your 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,104 @@
<?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>{A634DE77-6F68-4579-B55C-9D8C48A02685}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{6968b3a4-1835-46a3-ac5c-1ae33b475983}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>CarouselViewChallenge.Droid</RootNamespace>
<AssemblyName>CarouselViewChallenge.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>v9.0</TargetFrameworkVersion>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</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>portable</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.Numerics" />
<Reference Include="System.Numerics.Vectors" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.2084" />
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.1.0" />
</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.xml" />
<AndroidResource Include="Resources\layout\Toolbar.xml" />
<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" />
<AndroidResource Include="Resources\drawable\xamarin_logo.png" />
<AndroidResource Include="Resources\drawable\tab_about.png" />
<AndroidResource Include="Resources\drawable\tab_feed.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable-hdpi\" />
<Folder Include="Resources\drawable-xhdpi\" />
<Folder Include="Resources\drawable-xxhdpi\" />
<Folder Include="Resources\drawable-xxxhdpi\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CarouselViewChallenge\CarouselViewChallenge.csproj">
<Project>{1AD32EAF-CE1F-497F-8598-87F19CDA3D10}</Project>
<Name>CarouselViewChallenge</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

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

@ -0,0 +1,34 @@
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace CarouselViewChallenge.Droid
{
[Activity(Label = "CarouselViewChallenge", 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 savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}

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

@ -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.companyname.carouselviewchallenge">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="CarouselViewChallenge.Android"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</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("CarouselViewChallenge.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CarouselViewChallenge.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.

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

После

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

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

После

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

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

После

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

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

@ -0,0 +1,11 @@
<?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,9 @@
<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>

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

Ширина:  |  Высота:  |  Размер: 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,30 @@
<?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 https://aka.ms/material-colors -->
<!-- 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,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace CarouselViewChallenge.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.SetFlags("CollectionView_Experimental");
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
}

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

@ -0,0 +1,117 @@
{
"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",
"filename": "Icon1024.png"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

@ -0,0 +1,142 @@
<?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>{E981DF49-12EE-46EC-9F08-D3FC5F4FF693}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{89a4fe7c-635d-49c9-8d8c-5cd363c0d68d}</TemplateGuid>
<OutputType>Exe</OutputType>
<RootNamespace>CarouselViewChallenge.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>CarouselViewChallenge.iOS</AssemblyName>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
</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>
<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>
</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>
<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>
<CodesignKey>iPhone Developer</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>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
<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>
<BundleResource Include="Resources\tab_about.png" />
<BundleResource Include="Resources\tab_about%402x.png" />
<BundleResource Include="Resources\tab_about%403x.png" />
<BundleResource Include="Resources\tab_feed.png" />
<BundleResource Include="Resources\tab_feed%402x.png" />
<BundleResource Include="Resources\tab_feed%403x.png" />
<BundleResource Include="Resources\xamarin_logo.png" />
<BundleResource Include="Resources\xamarin_logo%402x.png" />
<BundleResource Include="Resources\xamarin_logo%403x.png" />
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.2084" />
<PackageReference Include="Xamarin.Essentials" Version="1.1.0" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\CarouselViewChallenge\CarouselViewChallenge.csproj">
<Project>{1AD32EAF-CE1F-497F-8598-87F19CDA3D10}</Project>
<Name>CarouselViewChallenge</Name>
</ProjectReference>
</ItemGroup>
</Project>

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

@ -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,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>CarouselViewChallenge</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.CarouselViewChallenge</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>CarouselViewChallenge</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>

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

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace CarouselViewChallenge.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("CarouselViewChallenge.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CarouselViewChallenge.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")]

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

После

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

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

После

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

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

После

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

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

После

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

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

После

Ширина:  |  Высота:  |  Размер: 8.2 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="600" height="600"/>
<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="180" height="180"/>
</resources>
</document>

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

После

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

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

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="CarouselViewChallenge.App">
<Application.Resources>
</Application.Resources>
</Application>

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

@ -0,0 +1,33 @@
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using CarouselViewChallenge.Views;
namespace CarouselViewChallenge
{
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new AppShell();
}
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
}
}
}

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

@ -0,0 +1,44 @@
<?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:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:local="clr-namespace:CarouselViewChallenge.Views"
Title="CarouselViewChallenge"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False"
x:Class="CarouselViewChallenge.AppShell">
<!--
Styles and Resources
-->
<Shell.Resources>
<ResourceDictionary>
<Color x:Key="NavigationPrimary">#2196F3</Color>
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.BackgroundColor" Value="{StaticResource NavigationPrimary}" />
<Setter Property="Shell.ForegroundColor" Value="White" />
<Setter Property="Shell.TitleColor" Value="White" />
<Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
<Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
<Setter Property="Shell.TabBarBackgroundColor" Value="{StaticResource NavigationPrimary}" />
<Setter Property="Shell.TabBarForegroundColor" Value="White"/>
<Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF"/>
<Setter Property="Shell.TabBarTitleColor" Value="White"/>
</Style>
<Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
</ResourceDictionary>
</Shell.Resources>
<!-- Your Pages -->
<TabBar>
<Tab Title="Welcome" Icon="tab_about.png">
<ShellContent ContentTemplate="{DataTemplate local:WelcomePage}" />
</Tab>
<Tab Title="Challenge" Icon="tab_feed.png">
<ShellContent ContentTemplate="{DataTemplate local:CarouselViewChallengePage}" />
</Tab>
</TabBar>
</Shell>

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

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace CarouselViewChallenge
{
public partial class AppShell : Xamarin.Forms.Shell
{
public AppShell()
{
InitializeComponent();
}
}
}

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

@ -0,0 +1,3 @@
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

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

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.2084" />
<PackageReference Include="Xamarin.Essentials" Version="1.1.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
<Compile Update="Views\WelcomePage.xaml.cs">
<DependentUpon>WelcomePage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Views\CarouselViewChallengePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>

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

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Text;
using Xamarin.Forms;
namespace CarouselViewChallenge.ViewModels
{
public class Section
{
public string Header { get; set; }
public FormattedString Content { get; set; }
public string Emoji { get; set; }
};
public class WelcomePageViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private ObservableCollection<Section> _sections;
public ObservableCollection<Section> Sections
{
get
{
return _sections;
}
set
{
if (_sections != value)
{
_sections = value;
OnPropertyChanged(new PropertyChangedEventArgs("Sections"));
}
}
}
private void OnPropertyChanged(PropertyChangedEventArgs eventArgs)
{
PropertyChanged?.Invoke(this, eventArgs);
}
}
}

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

@ -0,0 +1,13 @@
<?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:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="CarouselViewChallenge.Views.CarouselViewChallengePage">
<ContentPage.Content>
<StackLayout BackgroundColor="#cfd8dc">
<Label Text="You can use this page for the CarouselView Challenge!" HorizontalOptions="Center" VerticalOptions="CenterAndExpand"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>

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

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace CarouselViewChallenge.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class CarouselViewChallengePage : ContentPage
{
public CarouselViewChallengePage()
{
InitializeComponent();
}
}
}

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

@ -0,0 +1,26 @@
<?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:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="CarouselViewChallenge.Views.WelcomePage"
xmlns:vm="clr-namespace:CarouselViewChallenge.ViewModels"
Title="{Binding Title}">
<CarouselView ItemsSource="{Binding Sections}" PeekAreaInsets="50">
<CarouselView.ItemTemplate>
<DataTemplate>
<StackLayout BackgroundColor="#cfd8dc">
<Frame BorderColor="Gray" Margin="8" HasShadow="True" HeightRequest="450" VerticalOptions="CenterAndExpand">
<StackLayout>
<Label Text="{Binding Header}" FontSize="24" FontAttributes="Bold" HorizontalTextAlignment="Center"/>
<BoxView HeightRequest="2" BackgroundColor="DarkSlateGray"/>
<Label FormattedText="{Binding Content}" FontSize="18" Margin="16"/>
<Label Text="{Binding Emoji}" FontSize="128" HorizontalOptions="Center" VerticalOptions="CenterAndExpand"/>
</StackLayout>
</Frame>
</StackLayout>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
</ContentPage>

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

@ -0,0 +1,126 @@
using CarouselViewChallenge.ViewModels;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace CarouselViewChallenge.Views
{
// Learn more about making custom code visible in the Xamarin.Forms previewer
// by visiting https://aka.ms/xamarinforms-previewer
[DesignTimeVisible(false)]
public partial class WelcomePage : ContentPage
{
public WelcomePageViewModel VM { get; set; }
public WelcomePage()
{
InitializeComponent();
VM = new WelcomePageViewModel();
VM.Sections = new ObservableCollection<Section>
{
new Section
{
Header = "Thank you for participating in the CarouselView Challenge!",
Content = new FormattedString
{
Spans =
{
new Span
{
Text = "Your feedback is highly valuable for helping to drive CarouselView's development and highlight functionality you need most." + Environment.NewLine + Environment.NewLine
},
new Span
{
Text = "(This is a CarouselView, so swipe to the left to keep reading!)",
FontAttributes = FontAttributes.Italic
}
}
}
},
new Section
{
Header = "What to Do",
Content = new FormattedString
{
Spans =
{
new Span
{
Text = "Pick an app and reproduce a part of it where you can use the CarouselView." + Environment.NewLine + Environment.NewLine
},
new Span
{
Text = "This could be part of an app you've developed using Xamarin.Forms, or anything you'd like. Your choice!"
}
}
}
},
new Section
{
Header = "Create a PR and Give Feedback",
Content = new FormattedString
{
Spans =
{
new Span
{
Text = "When you're finished, open a PR with your work, and feel free to share screenshots." + Environment.NewLine + Environment.NewLine
},
new Span
{
Text = "If you participated in the CollectionView Challenge, you'll be familiar with the feedback we'd like you to provide:"
}
}
}
},
new Section
{
Header = "1. What went well?",
Content = new FormattedString
{
Spans =
{
new Span
{
Text = "Was the CarouselView easy to use? Were you able to accomplish what you set out to?" + Environment.NewLine + Environment.NewLine
}
}
},
Emoji = "😀"
},
new Section
{
Header = "2. What didn't go well?",
Content = new FormattedString
{
Spans =
{
new Span
{
Text = "Be as honest and detailed as possible." + Environment.NewLine + Environment.NewLine
}
}
},
Emoji = "🙁"
},
new Section
{
Header = "3. What's missing?",
Content = new FormattedString
{
Spans =
{
new Span
{
Text = "Let us know about any functionality you didn't have access to and its impact on you, or anything else you'd like to see." + Environment.NewLine + Environment.NewLine
}
}
},
Emoji = "🤔"
},
};
BindingContext = VM;
}
}
}

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

@ -0,0 +1,15 @@
# CarouselView Challenge
Following up on the [CollectionView Challenge](https://github.com/pauldipietro/CollectionViewChallenge), the CarouselView Challenge is aimed at using the new CarouselView in the context of real-world apps.
_Note: Some functionality may not be (fully) implemented yet as of this time. We're working to make sure that it is, but we still want your feedback on what's available now!_
## Challenge Quick Start
1. Fork this repository; you can run the solution to see a welcome page with similar instructions.
2. Open `CarouselViewChallengePage.xaml`
3. Replicate functionality from another project/app where you can use the CarouselView. If you need to, you can replace any data with placeholders.
4. Submit a pull request of your progress back to this repository. Please include the following feedback:
- Comparison screenshots of your results! If you really want to go the extra mile, video is awesome to see, too.
- Your experience converting the `CarouselView` (Any difficulties?)
- Is there anything missing that you'd like to see?