Skip to content

Commit ffb7d49

Browse files
committed
Updated sample to use Shell and Visual
1 parent 16e9a9e commit ffb7d49

File tree

94 files changed

+7825
-7137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+7825
-7137
lines changed

Media/Xamanimation 1.3.pptx

5.25 MB
Binary file not shown.

Media/xamanimation-delayed.gif

90.2 KB
Loading

Media/xamanimation-progress.gif

4 MB
Loading

Media/xamanimation-repeat.gif

311 KB
Loading

Media/xamanimation-transitions.gif

103 KB
Loading

Media/xamanimation-triggers.gif

466 KB
Loading

Xamanimation.Sample/Xamanimation.Sample.Droid/Assets/AboutAssets.txt Xamanimation.Sample/Xamanimation.Sample.Android/Assets/AboutAssets.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ AssetManager, like this:
66

77
public class ReadAsset : Activity
88
{
9-
protected override void OnCreate (Bundle bundle)
10-
{
11-
base.OnCreate (bundle);
9+
protected override void OnCreate (Bundle bundle)
10+
{
11+
base.OnCreate (bundle);
1212

13-
InputStream input = Assets.Open ("my_asset.txt");
14-
}
13+
InputStream input = Assets.Open ("my_asset.txt");
14+
}
1515
}
1616

1717
Additionally, some Android functions will automatically load asset files:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Android.App;
2+
using Android.Content.PM;
3+
using Android.OS;
4+
using Xamarin.Forms;
5+
6+
namespace Xamanimation.Sample.Droid
7+
{
8+
[Activity(
9+
Label = "Xamanimation",
10+
Icon = "@mipmap/icon",
11+
Theme = "@style/MainTheme",
12+
MainLauncher = true,
13+
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
14+
public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity
15+
{
16+
protected override void OnCreate(Bundle savedInstanceState)
17+
{
18+
TabLayoutResource = Resource.Layout.Tabbar;
19+
ToolbarResource = Resource.Layout.Toolbar;
20+
21+
base.OnCreate(savedInstanceState);
22+
Forms.Init(this, savedInstanceState);
23+
FormsMaterial.Init(this, savedInstanceState);
24+
LoadApplication(new App());
25+
}
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.Xamanimation.Sample">
3+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
4+
<application android:label="Xamanimation.Sample.Android"></application>
5+
</manifest>

Xamanimation.Sample/Xamanimation.Sample.Droid/Properties/AssemblyInfo.cs Xamanimation.Sample/Xamanimation.Sample.Android/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// General Information about an assembly is controlled through the following
77
// set of attributes. Change these attribute values to modify the information
88
// associated with an assembly.
9-
[assembly: AssemblyTitle("Xamanimation.Sample.Droid")]
9+
[assembly: AssemblyTitle("Xamanimation.Sample.Android")]
1010
[assembly: AssemblyDescription("")]
1111
[assembly: AssemblyConfiguration("")]
1212
[assembly: AssemblyCompany("")]
13-
[assembly: AssemblyProduct("Xamanimation.Sample.Droid")]
13+
[assembly: AssemblyProduct("Xamanimation.Sample.Android")]
1414
[assembly: AssemblyCopyright("Copyright © 2014")]
1515
[assembly: AssemblyTrademark("")]
1616
[assembly: AssemblyCulture("")]

Xamanimation.Sample/Xamanimation.Sample.Droid/Resources/Resource.Designer.cs Xamanimation.Sample/Xamanimation.Sample.Android/Resources/Resource.designer.cs

+6,440-4,712
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
android:id="@+id/sliding_tabs"
5+
android:layout_width="match_parent"
6+
android:layout_height="wrap_content"
7+
android:background="?attr/colorPrimary"
8+
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
9+
app:tabIndicatorColor="@android:color/white"
10+
app:tabGravity="fill"
11+
app:tabMode="fixed" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<android.support.v7.widget.Toolbar
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/toolbar"
4+
android:layout_width="match_parent"
5+
android:layout_height="wrap_content"
6+
android:background="?attr/colorPrimary"
7+
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
8+
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
9+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/launcher_background" />
4+
<foreground android:drawable="@mipmap/launcher_foreground" />
5+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/launcher_background" />
4+
<foreground android:drawable="@mipmap/launcher_foreground" />
5+
</adaptive-icon>
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="launcher_background">#FFFFFF</color>
4+
<color name="colorPrimary">#3F51B5</color>
5+
<color name="colorPrimaryDark">#303F9F</color>
6+
<color name="colorAccent">#FF4081</color>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<resources>
3+
4+
<style name="MainTheme" parent="MainTheme.Base">
5+
</style>
6+
<!-- Base theme applied no matter what API -->
7+
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
8+
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
9+
<item name="windowNoTitle">true</item>
10+
<!--We will be using the toolbar so no need to show ActionBar-->
11+
<item name="windowActionBar">false</item>
12+
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
13+
<!-- colorPrimary is used for the default action bar background -->
14+
<item name="colorPrimary">#2196F3</item>
15+
<!-- colorPrimaryDark is used for the status bar -->
16+
<item name="colorPrimaryDark">#1976D2</item>
17+
<!-- colorAccent is used as the default value for colorControlActivated
18+
which is used to tint widgets -->
19+
<item name="colorAccent">#FF4081</item>
20+
<!-- You can also set colorControlNormal, colorControlActivated
21+
colorControlHighlight and colorSwitchThumbNormal. -->
22+
<item name="windowActionModeOverlay">true</item>
23+
24+
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
25+
</style>
26+
27+
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
28+
<item name="colorAccent">#FF4081</item>
29+
</style>
30+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectGuid>{255AC25F-9AFC-4C30-B3D9-C265D7904A2A}</ProjectGuid>
7+
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
8+
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
9+
<OutputType>Library</OutputType>
10+
<RootNamespace>Xamanimation.Sample.Droid</RootNamespace>
11+
<AssemblyName>Xamanimation.Sample.Android</AssemblyName>
12+
<AndroidApplication>True</AndroidApplication>
13+
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
14+
<AndroidResgenClass>Resource</AndroidResgenClass>
15+
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
16+
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
17+
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
18+
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
19+
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
20+
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
21+
<NuGetPackageImportStamp>
22+
</NuGetPackageImportStamp>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25+
<DebugSymbols>true</DebugSymbols>
26+
<DebugType>portable</DebugType>
27+
<Optimize>false</Optimize>
28+
<OutputPath>bin\Debug</OutputPath>
29+
<DefineConstants>DEBUG;</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
<AndroidLinkMode>None</AndroidLinkMode>
33+
</PropertyGroup>
34+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
35+
<DebugSymbols>true</DebugSymbols>
36+
<DebugType>pdbonly</DebugType>
37+
<Optimize>true</Optimize>
38+
<OutputPath>bin\Release</OutputPath>
39+
<ErrorReport>prompt</ErrorReport>
40+
<WarningLevel>4</WarningLevel>
41+
<AndroidManagedSymbols>true</AndroidManagedSymbols>
42+
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
43+
</PropertyGroup>
44+
<ItemGroup>
45+
<Reference Include="Mono.Android" />
46+
<Reference Include="System" />
47+
<Reference Include="System.Core" />
48+
<Reference Include="System.Xml.Linq" />
49+
<Reference Include="System.Xml" />
50+
</ItemGroup>
51+
<ItemGroup>
52+
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.1" />
53+
<PackageReference Include="Xamarin.Forms" Version="4.1.0.618606" />
54+
<PackageReference Include="Xamarin.Forms.Visual.Material">
55+
<Version>4.1.0.618606</Version>
56+
</PackageReference>
57+
</ItemGroup>
58+
<ItemGroup>
59+
<Compile Include="MainActivity.cs" />
60+
<Compile Include="Resources\Resource.designer.cs" />
61+
<Compile Include="Properties\AssemblyInfo.cs" />
62+
</ItemGroup>
63+
<ItemGroup>
64+
<None Include="Resources\AboutResources.txt" />
65+
<None Include="Assets\AboutAssets.txt" />
66+
<None Include="Properties\AndroidManifest.xml" />
67+
</ItemGroup>
68+
<ItemGroup>
69+
<AndroidResource Include="Resources\layout\Tabbar.axml" />
70+
<AndroidResource Include="Resources\layout\Toolbar.axml" />
71+
<AndroidResource Include="Resources\values\styles.xml" />
72+
<AndroidResource Include="Resources\values\colors.xml" />
73+
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
74+
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
75+
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
76+
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
77+
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
78+
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
79+
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
80+
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
81+
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
82+
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
83+
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
84+
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
85+
</ItemGroup>
86+
<ItemGroup>
87+
<Folder Include="Resources\drawable-hdpi\" />
88+
<Folder Include="Resources\drawable-xhdpi\" />
89+
<Folder Include="Resources\drawable-xxhdpi\" />
90+
<Folder Include="Resources\drawable-xxxhdpi\" />
91+
</ItemGroup>
92+
<ItemGroup>
93+
<ProjectReference Include="..\Xamanimation.Sample\Xamanimation.Sample.csproj">
94+
<Project>{EACE80A5-47A2-42C2-B338-F47BB1860E3B}</Project>
95+
<Name>Xamanimation.Sample</Name>
96+
</ProjectReference>
97+
</ItemGroup>
98+
<ItemGroup>
99+
<AndroidResource Include="Resources\drawable\monkeys.jpg" />
100+
</ItemGroup>
101+
<ItemGroup>
102+
<AndroidResource Include="Resources\drawable\heart.png" />
103+
</ItemGroup>
104+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
105+
</Project>

Xamanimation.Sample/Xamanimation.Sample.Droid/MainActivity.cs

-23
This file was deleted.

Xamanimation.Sample/Xamanimation.Sample.Droid/Properties/AndroidManifest.xml

-5
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)