Skip to content

Commit

Permalink
Merge pull request #27 from muak/surveyFlat
Browse files Browse the repository at this point in the history
correspond to Xamarin.Forms 2.5.0.280555
  • Loading branch information
muak authored Mar 26, 2018
2 parents 6187f66 + cfe39d0 commit 0ba6ea3
Show file tree
Hide file tree
Showing 21 changed files with 99 additions and 89 deletions.
6 changes: 0 additions & 6 deletions AiForms.Effects.Droid/AddCommandPlatformEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,6 @@ RippleDrawable CreateRipple(Android.Graphics.Color color)
var mask = new ColorDrawable(Android.Graphics.Color.White);
return _ripple = new RippleDrawable(getPressedColorSelector(color), null, mask);
}
else if (back is RippleDrawable) {
_ripple = back.GetConstantState().NewDrawable() as RippleDrawable;
_ripple.SetColor(getPressedColorSelector(color));

return _ripple;
}
else {
return _ripple = new RippleDrawable(getPressedColorSelector(color), back, null);
}
Expand Down
16 changes: 8 additions & 8 deletions AiForms.Effects.Droid/AiForms.Effects.Droid.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props')" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<RootNamespace>AiForms.Effects.Droid</RootNamespace>
<AssemblyName>AiForms.Effects.Droid</AssemblyName>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
Expand Down Expand Up @@ -93,19 +93,19 @@
<HintPath>..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.dll</HintPath>
</Reference>
<Reference Include="FormsViewGroup">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.Android">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -160,5 +160,5 @@
<Import Project="..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets" Condition="Exists('..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Design.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Design.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Design.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Design.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets" Condition="Exists('..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets')" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.targets')" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.targets')" />
</Project>
11 changes: 3 additions & 8 deletions AiForms.Effects.Droid/ToFlatButtonPlatformEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Android.Support.V7.Widget;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using System;

[assembly: ExportEffect(typeof(ToFlatButtonPlatformEffect), nameof(ToFlatButton))]
namespace AiForms.Effects.Droid
Expand All @@ -22,7 +23,6 @@ public class ToFlatButtonPlatformEffect : AiEffectBase

private Drawable OrgBackground;
private StateListAnimator OrgStateListAnimator;
private ColorStateList OrgBackgroundTint;

protected override void OnAttached()
{
Expand All @@ -34,12 +34,9 @@ protected override void OnAttached()

OrgBackground = NativeButton.Background;
OrgStateListAnimator = NativeButton.StateListAnimator;
OrgBackgroundTint = NativeButton.SupportBackgroundTintList;

//shadow off
NativeButton.StateListAnimator = null;
//disabled default background
NativeButton.SupportBackgroundTintList = null;

Shape = new GradientDrawable();
Shape.SetShape(ShapeType.Rectangle);
Expand All @@ -57,7 +54,6 @@ protected override void OnDetached()
if (!IsDisposed) {
NativeButton.Background = OrgBackground;
NativeButton.StateListAnimator = OrgStateListAnimator;
NativeButton.SupportBackgroundTintList = OrgBackgroundTint;
}
Colors.Dispose();
Shape.Dispose();
Expand All @@ -68,7 +64,6 @@ protected override void OnDetached()
NativeButton = null;
OrgBackground = null;
OrgStateListAnimator = null;
OrgBackgroundTint = null;

Colors = null;
Shape = null;
Expand All @@ -88,7 +83,7 @@ protected override void OnElementPropertyChanged(System.ComponentModel.PropertyC
if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) {
UpdateBackgroundColor();
}
else if (e.PropertyName == Button.BorderRadiusProperty.PropertyName) {
else if (e.PropertyName == Button.CornerRadiusProperty.PropertyName || e.PropertyName == Button.BorderRadiusProperty.PropertyName) {
UpdateBorderRadius();
}
else if (e.PropertyName == Button.BorderWidthProperty.PropertyName) {
Expand Down Expand Up @@ -130,7 +125,7 @@ void UpdateBackgroundColor()
}
void UpdateBorderRadius()
{
var size = (float)Control.Context.ToPixels(FormsButton.BorderRadius);
var size = (float)Control.Context.ToPixels(Math.Max(FormsButton.CornerRadius,FormsButton.BorderRadius));
Shape.SetCornerRadius(size);
}
void UpdateBorder()
Expand Down
2 changes: 1 addition & 1 deletion AiForms.Effects.Droid/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
<package id="Xamarin.Android.Support.v7.Palette" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Forms" version="2.5.0.121934" targetFramework="monoandroid80" />
<package id="Xamarin.Forms" version="2.5.0.280555" targetFramework="monoandroid81" />
</packages>
12 changes: 6 additions & 6 deletions AiForms.Effects.iOS/AiForms.Effects.iOS.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props')" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -47,16 +47,16 @@
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.iOS">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.2.5.0.121934\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -92,5 +92,5 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.targets')" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.targets')" />
</Project>
2 changes: 1 addition & 1 deletion AiForms.Effects.iOS/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Forms" version="2.5.0.121934" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.5.0.280555" targetFramework="xamarinios10" />
</packages>
2 changes: 1 addition & 1 deletion AiForms.Effects/AiForms.Effects.nuget.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.props" Condition="Exists('$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.props')" />
<Import Project="$(NuGetPackageRoot)xamarin.forms/2.5.0.280555/build/netstandard1.0/Xamarin.Forms.props" Condition="Exists('$(NuGetPackageRoot)xamarin.forms/2.5.0.280555/build/netstandard1.0/Xamarin.Forms.props')" />
</ImportGroup>
</Project>
2 changes: 1 addition & 1 deletion AiForms.Effects/AiForms.Effects.nuget.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms/2.5.0.121934/build/netstandard1.0/Xamarin.Forms.targets')" />
<Import Project="$(NuGetPackageRoot)xamarin.forms/2.5.0.280555/build/netstandard1.0/Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms/2.5.0.280555/build/netstandard1.0/Xamarin.Forms.targets')" />
</ImportGroup>
</Project>
4 changes: 2 additions & 2 deletions AiForms.Effects/project.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dependencies": {
"Xamarin.Forms": "2.5.0.121934",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1"
"Xamarin.Forms": "2.5.0.280555"
},
"frameworks": {
"netstandard1.4": {}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ There are properties of Command and Parameter for tap and long tap.
|SearchBar |||
|Slider |||
|Stepper |||
|Switch || |
|Switch || |
|TableView |||
|TimePicker |||
|WebView |||
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props')" />
<Import Project="..\..\..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<RootNamespace>AiEffects.TestApp.Droid</RootNamespace>
<AssemblyName>AiEffects.TestApp.Droid</AssemblyName>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
Expand Down Expand Up @@ -102,21 +102,6 @@
<Reference Include="Xamarin.Android.Support.v7.MediaRouter">
<HintPath>..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.dll</HintPath>
</Reference>
<Reference Include="FormsViewGroup">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.Android">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.121934\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="Prism">
<HintPath>..\..\..\packages\Prism.Core.6.3.0\lib\MonoAndroid10\Prism.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -146,6 +131,21 @@
<Reference Include="ReactiveProperty">
<HintPath>..\..\..\packages\ReactiveProperty.3.6.0\lib\MonoAndroid\ReactiveProperty.dll</HintPath>
</Reference>
<Reference Include="FormsViewGroup">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.Android">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AiEffects.Sample\AiEffects.Sample.csproj">
Expand Down Expand Up @@ -209,5 +209,5 @@
<Import Project="..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets" Condition="Exists('..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets')" />
<Import Project="..\..\..\packages\Xamarin.Android.Support.Design.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Design.targets" Condition="Exists('..\..\..\packages\Xamarin.Android.Support.Design.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Design.targets')" />
<Import Project="..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets" Condition="Exists('..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets')" />
<Import Project="..\..\..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.targets')" />
<Import Project="..\..\..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\packages\Xamarin.Forms.2.5.0.280555\build\netstandard1.0\Xamarin.Forms.targets')" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@
<package id="Xamarin.Android.Support.v7.Palette" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Forms" version="2.5.0.121934" targetFramework="monoandroid80" />
<package id="Xamarin.Forms" version="2.5.0.280555" targetFramework="monoandroid81" />
</packages>
Loading

0 comments on commit 0ba6ea3

Please sign in to comment.