Skip to content

Commit

Permalink
Add init method in android
Browse files Browse the repository at this point in the history
  • Loading branch information
Satoshi Nakamura committed Aug 24, 2019
1 parent a4f0e9f commit db2a26f
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
1 change: 1 addition & 0 deletions AiForms.Effects.Droid/AiForms.Effects.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
<Compile Include="FloatingPlatformEffect.cs" />
<Compile Include="PlatformUtility.cs" />
<Compile Include="FloatingLayoutRenderer.cs" />
<Compile Include="Initialize.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
Expand Down
10 changes: 10 additions & 0 deletions AiForms.Effects.Droid/Initialize.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;
using Android.Runtime;
namespace AiForms.Effects.Droid
{
[Preserve(AllMembers = true)]
public static class Initialize
{
public static void Init() { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ViewCellPageViewModel

public ViewCellPageViewModel(INavigationService navigationService, IPageDialogService pageDlg)
{
for (var i = 0; i < 20;i++){
for (var i = 0; i < 40;i++){
ItemsSource.Add("Name");
}

Expand Down
23 changes: 21 additions & 2 deletions Tests/AiEffects.TestApp/AiEffects.TestApp/Views/ViewCellPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ef="clr-namespace:AiForms.Effects;assembly=AiForms.Effects"
xmlns:sv="clr-namespace:AiForms.Renderers;assembly=SettingsView"
x:Class="AiEffects.TestApp.Views.ViewCellPage">
<StackLayout Orientation="Vertical">
<Label Text="XYZ" BackgroundColor="Red" HeightRequest="30" VerticalOptions="Start"
Expand All @@ -12,19 +13,37 @@
ef:AlterLineHeight.Multiple="1.5"
ef:SizeToFit.CanExpand="true" />

<ListView ItemsSource="{Binding ItemsSource}" x:Name="listview" VerticalOptions="FillAndExpand">
<!--<ListView ItemsSource="{Binding ItemsSource}" x:Name="listview" VerticalOptions="FillAndExpand">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding}" HorizontalOptions="StartAndExpand" />
<Slider Minimum="0" Maximum="1" Value="0.5" ef:AlterColor.Accent="Red" HorizontalOptions="FillAndExpand" />
<ContentView BackgroundColor="Red" HorizontalOptions="End" WidthRequest="30" HeightRequest="30"
ef:AddCommand.On="true" ef:AddCommand.Command="{Binding BindingContext.TestCommand,Source={x:Reference listview}}" ef:AddCommand.EnableRipple="true"
/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ListView>-->
<sv:SettingsView>
<sv:Section ItemsSource="{Binding ItemsSource}" x:Name="listview">
<sv:Section.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding}" HorizontalOptions="StartAndExpand" />
<Slider Minimum="0" Maximum="1" Value="0.5" ef:AlterColor.Accent="Red" HorizontalOptions="FillAndExpand" />
<ContentView BackgroundColor="Red" HorizontalOptions="End" WidthRequest="30" HeightRequest="30"
ef:AddCommand.On="true" ef:AddCommand.Command="{Binding BindingContext.TestCommand,Source={x:Reference listview}}" ef:AddCommand.EnableRipple="true"
/>
</StackLayout>
</ViewCell>
</DataTemplate>
</sv:Section.ItemTemplate>
</sv:Section>
</sv:SettingsView>
</StackLayout>
</ContentPage>
6 changes: 5 additions & 1 deletion nuget/AzurePipelines.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Xamarin.Forms Effects(add Border / add placeholder / add Text / add Command / add NumberPicker, TimePicker and DatePicker / alter color for switch and slider / alter LineHeight of Label and Editor / Button to flat / Size to fit for Label / add touch events / Floating / Feedback) for iOS / Android</description>
<summary></summary>
<releaseNotes>
<releaseNotes>
## Changes

* Add the Android platform init method.

## Bug fixes

* AlterColor – Slider thumb color isn't changed.
Expand Down

0 comments on commit db2a26f

Please sign in to comment.