Giter VIP home page Giter VIP logo

aiforms.effects's Introduction

AiForms.Effects for Xamarin.Forms

AiForms.Effects is the effects library that provides you with more flexible functions than default by targetting only Android and iOS in a Xamarin.Forms project.

Japanese

Build status

Features

Trigger Property (1.4.0~)

Though toggling an effect had used On property in less than ver.1.4.0, As of ver.1.4.0, an effect can be enabled by setting one or more main properties of the effect. These properties are named "Trigger Properties".

Trigger properties correspond to main properties such as Command and LongCommand in case of AddCommand Effect.

In this document, trigger properties are written "trigger".

Old (~1.3.1)

<Label Text="Text" ef:AddCommand.On="true" ef:AddCommand.Command="{Binding GoCommand}" />

Always needs On property.

New (1.4.0~)

<Label Text="Text" ef:AddCommand.Command="{Binding GoCommand}" />

Need not On property when specified Trigger Property.

To keep traditional

If an effect had been used to dynamically toggle to with the On property specified, it may not correctly work on the trigger properties mode. To keep traditional mode, you can disable trigger properties by specifying the static config property at any place in .NETStandard project as the following code.

AiForms.Effects.EffectConfig.EnableTriggerProperty = false;

Minimum Device and Version etc

iOS:iPhone5s,iPod touch6,iOS9.3
Android:version 5.1.1 (only FormsAppcompatActivity) / API22

Nuget Installation

Install-Package AiForms.Effects

You need to install this nuget package to .NETStandard project and each platform project.

for iOS project

You need to write the following code in AppDelegate.cs:

public override bool FinishedLaunching(UIApplication app, NSDictionary options) {
    
    global::Xamarin.Forms.Forms.Init();
    AiForms.Effects.iOS.Effects.Init();  //need to write here

    ...
    return base.FinishedLaunching(app, options);
}

for Android project

You need to write the following code in MainActivity.cs:

protected override void OnCreate(Bundle bundle) {
            
    base.OnCreate(bundle);

    global::Xamarin.Forms.Forms.Init(this, bundle);
    AiForms.Effects.Droid.Effects.Init(); //need to write here
    ...
}

Gradient

This is the effect that the gradient background is set to a Layout Element. Although It can be set to the controls except with Layouts, its implementation is not complete.

Properties

  • On
    • Effect On/Off (true is On)
  • Colors (trigger)
    • The colors of gradient.
    • Can set multiple colors with comma-separated in Xaml.
    • Specify the instance of the GradientColors class in c#.
  • Orientation
    • Specify the direction for the gradient.
    • Can select from 8 directions.

How to write with XAML

<ContentView 
    ef:Gradient.Colors="Red,Yellow,#800000FF"
    ef:Gradient.Orientation="RightLeft"	>
    <Label Text="Abc" />			
</ContentView>

Floating

This is the effect that arranges some floating views (e.g. FAB) at any place on a page. The arranged elements are displayed more front than a ContentPage and are not affected a ContentPage scrolling.

How to use

This sample is that an element is arranged at above 25dp from the vertical end and left 25dp from the horizontal end.

<ContentPage xmlns:ef="clr-namespace:AiForms.Effects;assembly=AiForms.Effects">
    
    <ef:Floating.Content>
        <ef:FloatingLayout>
            <!-- This element is arranged at above 25dp from the vertical end and left 25dp from the horizontal end. -->
            <ef:FloatingView 
                VerticalLayoutAlignment="End" 
                HorizontalLayoutAlignment="End"
                OffsetX="-25" OffsetY="-25" >
                 <!-- Code behind handling / ViewModel binding OK -->
                 <Button Clicked="BlueTap" BackgroundColor="{Binding ButtonColor}" 
                         BorderRadius="28" WidthRequest="56" HeightRequest="56" 
                         Text="+" FontSize="24"
                         TextColor="White" Padding="0" />
            </ef:FloatingView>
        </ef:FloatingLayout>
    </ef:Floating.Content>

    <StackLayout>
        <Label Text="MainContents" />
    </StackLayout>
</ContentPage>

Property

  • Content (trigger)
    • The root element to arrange floating views.
    • This property is of type FloatingLayout.

Note that this effect doesn't work without trigger property because it hasn't an On property.

FloatingLayout

This is the Layout that can freely arrange several FloatingView's over a page.

FloatingView

It is a view that FloatingLayout arranges. This view is used to specify HorizontalLayoutAlignment, VerticalLayoutAlignment, OffsetX, OffsetX and determine itself position. This view can be set any VisualElements.

Properties

  • HorizontalLayoutAlignment (defalut: Center)
    • The horizontal position enumeration value (Start / Center / End / Fill)
  • VerticalLayoutAlignment (default: Center)
    • The vertical position enumeration value (Start / Center / End / Fill)
  • OffsetX
    • The adjustment relative value from the horizontal layout position. (without Fill)
  • OffsetY
    • The adjustment relative value from the vertical layout position. (without Fill)
  • Hidden
    • The bool value whether a view is hidden or shown.
    • On Android, If IsVisible is false when a page is rendered, there is the issue that views are never displayed. This method is used to avoid the issue. If there is some problem using IsVisible, use this instead of.
    • In internal, this property uses Opacity and InputTransparent properties.

Feedback

This is the effect that adds touch feedback effects (color and sound) to a view. This effect can be made use of with others effect (for example, AddNumberPicker and AddDatePicker) simultaneously. However, AddCommand can't be used along with this effect because AddCommand contains this functions.

Properties

  • EffectColor (trigger)
    • Touch feedback color. (default: transparent)
  • EnableSound (trigger)
    • Touch feedback system sound. (default: false)

AddTouch

This is the effect that adds touch events (begin, move, end, cancel) to a view. Each touch events provides location property and can be taken X and Y position.

Properties

  • On
    • Effect On / Off

Since this effect hasn't any trriger property, control by On property.

TouchRecognizer events

  • TouchBegin
  • TouchMove
  • TouchEnd
  • TouchCancel

Demo

https://youtu.be/9zrVQcr_Oqo

How to use

This effect usage is a little different from the other effects. First of all, set On attached property to a target control and set the value to true in XAML.

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage 
    ...
    xmlns:ef="clr-namespace:AiForms.Effects;assembly=AiForms.Effects">
    <StackLayout HeightRequest="300" ef:AddTouch.On="true" x:Name="container" />
</ContentPage>

In turn, use AddTouch.GetRecognizer method, get a TouchRecognizer in code. This recognizer can be used to handle each touch events.

var recognizer = AddTouch.GetRecognizer(container);

recognizer.TouchBegin += (sender, e) => {
    Debug.WriteLine("TouchBegin");
};

recognizer.TouchMove += (sender, e) =>  {
    Debug.WriteLine("TouchMove");
    Debug.WriteLine($"X: {e.Location.X} Y:{e.Location.Y}"); 
};

recognizer.TouchEnd += (sender, e) => {
    Debug.WriteLine("TouchEnd");
};

recognizer.TouchCancel += (sender, e) => {
    Debug.WriteLine("TouchCancel");
};

SizeToFit

This is the effect that make font size adjusted to fit the Label size. This can be used only Label.

Properties

  • On
    • Effect On/Off (true is On)
  • CanExpand
    • Whether font size is expanded when making it fit. (Default true)
    • If false, font size won't be expanded and only shrinked.

Since this effect hasn't any trriger property, control by On property.

Demo

https://youtu.be/yMjcFOp38XE

How to write with Xaml

<ContentPage 
	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"
	x:Class="AiEffects.TestApp.Views.BorderPage">
	<Label Text="LongText..." ef:SizeToFit.On="true" ef.SizeToFit.CanExpand="false"
			HeightRequest="50" Width="200"  />
</ContentPage>

Border

This is the effect that add border to a view.
Entry, Picker, DatePicker and TimePicker on iOS have a border by default.
When specifying their width 0, it is possible that hide border.

Properties

  • On
    • Effect On/Off (true is On)
  • Width (trigger)
    • Border width (default null)
  • Color
    • Border color (default transparent)
  • Radius (trigger)
    • Border radius (default 0)

How to write with Xaml

<ContentPage 
	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"
	x:Class="AiEffects.TestApp.Views.BorderPage">
	<StackLayout Margin="4" 
        ef:Border.Width="2" ef:Border.Radius="6" ef:Border.Color="Red">
		<Label Text="hoge" />
        <Label Text="fuga" />
	</StackLayout>
</ContentPage>

Limitations

  • On Android Entry, Picker, DatePicker, TimePicker's input underline is hidden if this effect attached.
  • On Android, Button is not displayed correctly. Use ToFlatButton for button.
  • On Android WebView, Frame, ScrollView are not supported.
  • On Android ListView and TableView overflow background from border.
  • Using AddCommand simultaneously is not supported.

ToFlatButton

This is the effect that alter Button to flat(only Android).
If this effect is used, you will be able to design like iOS's Button.
And also this effect will enable BorderRadius, BorderWidth and BorderColor of default button properties to use by Android.

Supported View

  • Button (Android)

Properties

  • On
    • Effect On/Off (true is On)
  • RippleColor (trigger)
    • Ripple effect color.(default none)

How to write with Xaml

<Button Text="ButtonText" 
	ef:ToFlatButton.On="true" 
	ef:ToFlatButton.RippleColor="Red"
	BorderWidth="4" BorderColor="Green" BorderRadius="10" 
/>

AddText

This is the effect that add one line text into a view.
If you use this effect, for example you will be able to show a information that validations or character count etc.
You will be able to change text position(top-left,top-right,bottom-left,bottom-right), text color,font size and margin by specifying property.

Supported View

  • Label
  • Entry
  • Editor
  • StackLayout
  • AbsoluteLayout

and more.

Properties

  • On
    • Effect On/Off (true is On)
  • Text (trigger)
    • added text
  • TextColor
    • Default Red
  • BackgroundColor
    • BackgroundColor of inner text view.
    • Default Transparent
  • FontSize
    • Default 8
  • Margin
    • Distance from a side of target view to inner text view.
    • Default 0,0,0,0
  • Padding
    • Padding of inner text view.
    • Default 0,0,0,0
  • HorizontalAlign
    • horizontal text position(Start or End). Default End.
  • VerticalAlign
    • vertical text position(Start or End). Default Start.

How to write with Xaml

<ContentPage 
	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"
	x:Class="AiEffects.TestApp.Views.AddTextPage">
	<StackLayout Margin="4">
		<Entry HorizontalOptions="FillAndExpand" Text="{Binding Title}"
			ef:AddText.On="true" ef:AddText.TextColor="Red" 
			ef:AddText.FontSize="10" ef:AddText.Margin="4,8,4,8" 
			ef:AddText.Padding="2,4,2,4" ef:AddText.BackgroundColor="#A0F0F0E0"
			ef:AddText.HorizontalAlign="End"
			ef:AddText.VerticalAlign="Start" 
			ef:AddText.Text="{Binding TitleMessage}" />
	</StackLayout>
</ContentPage>

Limitations

When device rotates, text position will not be right in case android.

AddCommand

This Effect add Command function to a view.
There are properties of Command and Parameter for tap and long tap.

Supported View (in case Xamarin.Forms 3.6.0)

iOS Android
ActivityIndicator
BoxView
Button
DatePicker
Editor
Entry
Image
Label
ListView
Picker
ProgressBar
SearchBar
Slider
Stepper
Switch
TableView
TimePicker
WebView
ContentPresenter
ContentView
Frame
ScrollView
TemplatedView
AbsoluteLayout
Grid
RelativeLayout
StackLayout

Properties

  • On
    • Effect On/Off (true is On)
  • Command (trigger)
    • Tap Command
  • CommandParameter
    • Tap Command Parameter
  • LongCommand (trigger)
    • Long Tap Command
  • LongCommandParameter
    • Long Tap Command Parameter
  • EffectColor
    • foreground color when tapped. (default: transparent)
  • EnableRipple
    • Ripple Effect On/Off (default true,android only) If you don't have to use ripple effect, it make EnableRipple false.
    • This property is obsolete as of version 1.4.0.
  • EnableSound
    • When tapped, whether play system sound effect.(Default false)
  • SyncCanExecute
    • Whether synchronize Command's CanExecute to xamarin.forms.view's IsEnabled.(Default false)
    • If true, a view become opacity when disabled.

How to write with Xaml

<ContentPage 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"
		x:Class="AiEffects.Sample.Views.AddCommandPage">

        <StackLayout>
    		<Label Text="Label"
    			ef:AddCommand.On="true"
    			ef:AddCommand.EffectColor="#50FFFF00"
    			ef:AddCommand.Command="{Binding EffectCommand}"
    			ef:AddCommand.CommandParameter="Label"
                ef:AddCommand.LongCommand="{Binding LongTapCommand}"
                ef:AddCommand.LongCommandParameter="LongTap" />
        </StackLayout>
</ContentPage>

Limitation

On Android

  • If the version is more than or equal 1.1.0 and RippleEffect is applied to a Element which is a kind of Layout, the InputTransparent of the children become not to work.

Tips

Changing Sound Effect

AppDelegate

public override bool FinishedLaunching(UIApplication app, NSDictionary options) {
    global::Xamarin.Forms.Forms.Init();

    AiForms.Effects.iOS.Effects.Init();
    //here specify sound number
    AiForms.Effects.iOS.FeedbackPlatformEffect.PlaySoundNo = 1104;
    ...
}

MainActivity

protected override void OnCreate(Bundle bundle) {
    
    base.OnCreate(bundle);
    ...
    
    global::Xamarin.Forms.Forms.Init(this, bundle);
    
    //here specify SE
    AiForms.Effects.Droid.FeedbackPlatformEffect.PlaySoundEffect = Android.Media.SoundEffect.Spacebar;
    
    ...
}

When using Image

Ripple Effect will not occur foreground. In that case wrap by a layout view.

<StackLayout ef:AddCommand.On="{Binding EffectOn}"
			 ef:AddCommand.EffectColor="{Binding EffectColor}">
    <Image Source="image" />
</StackLayout>

AddNumberPicker

This Effect add NumberPicker function to a view.
When you tap the view ,Picker is shown. And when you select a number,it reflects to Number property.If you set Command property,it executes.

Supported View

  • Label
  • BoxView
  • Button
  • Image
  • StackLayout
  • AbsoluteLayout

and more. same with AddCommand.

Properties

  • On
    • Effect On/Off (true is On)
  • Min
    • minimum number(positive integer)
  • Max
    • maximum number(positive integer)
  • Number (trigger)
    • current number(default twoway binding)
  • Title
    • Picker Title(optional)
    • In case iOS, if this is so long, it will be not beautiful.
  • Command
    • command invoked when a number was picked(optional)

How to write with Xaml

<ContentPage 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:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
		prism:ViewModelLocator.AutowireViewModel="True"
		x:Class="AiEffects.Sample.Views.AddNumberPickerPage"
		Title="AddNumberPicker">
	<StackLayout>
		<Label Text="Text"
			ef:AddNumberPicker.On="true"
			ef:AddNumberPicker.Min="10"
			ef:AddNumberPicker.Max="999"
			ef:AddNumberPicker.Number="{Binding Number}"
			ef:AddNumberPicker.Title="Select your number"
            ef:AddNumberPicker.Command="{Binding SomeCommand}" />
    </StackLayout>
</ContentPage>

AddTimePicker

This is the effect that add TimePicker to a view.
When you tap the view, Picker is shown. And when a time is selected, that time will be reflected to Time property. If Command property is set, the command will be executed.

This effect supports views same with AddCommand.

Properties

  • On
    • Effect On/Off (true is On)
  • Time (trigger)
    • current time(default twoway binding)
  • Title
    • Picker Title(optional)
    • In case iOS, if this is so long, it will be not beautiful.
  • Command
    • command invoked when a time was picked(optional)

AddDatePicker

This is the effect that add DatePicker to a view.
When you tap the view, Picker is shown. And when a date is selected, that date will be reflected to Date property. If Command property is set, the command will be executed.

This effect supports views same with AddCommand.

Properties

  • On
    • Effect On/Off (true is On)
  • MinDate
    • minimum date(optional)
  • MaxDate
    • maximum date(optional)
  • Date (trigger)
    • current date(default twoway binding)
  • TodayText
    • button text to select today(optional / only iOS)
    • If this property is set, today's button will be shown. If that button is tapped, today will be selected.
  • Command
    • command invoked when a date was picked(optional)

AlterLineHeight

This Effect alter LineHeight of Label and Editor.

Supported View

  • Label
  • Editor

Properties

  • On
    • Effect On/Off (true is On)
  • Multiple (trigger)
    • Multiple to the font height.
    • The font height * this multiple will become line height.

How to write with Xaml

<ContentPage 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:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
		prism:ViewModelLocator.AutowireViewModel="True"
		x:Class="AiEffects.Sample.Views.AlterLineHeightPage"
		Title="AlterLineHeight">
	<StackLayout BackgroundColor="White" Spacing="4">
		<Label Text="{Binding LabelText}" VerticalOptions="Start" FontSize="12"
			ef:AlterLineHeight.On="true"
			ef:AlterLineHeight.Multiple="1.5"  />
	</StackLayout>
</ContentPage>

AlterColor

This is the effect that alter the color of an element which it cannot change color normally.

Supported views

iOS Android which part
Page Statusbar
Slider Trackbar
Switch Trackbar
Entry Under line
Editor Under line

Properties

  • On
    • Effect On/Off (true is On)
  • Accent (trigger)
    • changed color.

How to write with Xaml

<Slider Minimum="0" Maximum="1" Value="0.5" 
	ef:AlterColor.On="true" ef:AlterColor.Accent="Red" />

Placeholder

** This feature was implemented in Xamarin.Forms 3.2.0. **

In case you use version less than 3.2.0, this effect can be made use of.

This is the effect that show placeholder on Editor.
This effect supports Editor only.

Properties

  • On
    • Effect On/Off (true is On)
  • Text (trigger)
    • Placeholder text.
  • Color
    • Placeholder color.

How to write with Xaml

<ContentPage 
	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"
	x:Class="AiEffects.TestApp.Views.BorderPage">
	<Editor HeightRequest="150"
		ef:Placeholder.On="true"
		ef:Placeholder.Text="placeholder text"
		ef:Placeholder.Color="#E0E0E0"
	/>
</ContentPage>

Contributors

Donation

I am asking for your donation for continuous development🙇

Your donation will allow me to work harder and harder.

Sponsors

I am asking for sponsors too. This is a subscription.

Special Thanks

License

MIT Licensed.

aiforms.effects's People

Contributors

luckyducko avatar muak avatar yuka-abn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aiforms.effects's Issues

Android OnOverlayTouch crash

We are using your effects library with Xamarin forms 4.2.0 and it mostly works like a charm.

Although we discovered a problem within the Android specific implementation of OnOverlayTouch when using the AddCommand. When the user rapidly hits controls triggering the models data to refresh, the app crashes with a NullReferenceException due to the _view field being null.

We simply added a null check to _view to fix the problem:

void OnOverlayTouch(object sender, Android.Views.View.TouchEventArgs e)
{
    if (e.Event.Action == MotionEventActions.Down)
    {
        PlaySound();
    }

    _view?.DispatchTouchEvent(e.Event); // <-- Added null check

    e.Handled = false;
}

Maybe you could add this in the next release.

Border disappears on the second call of the NavigationPage.

I have two pages in my application: MainPage and SettingsPage. MainPage has a button to open the SettingsPage.
I use Autofac as IoC container. Both my pages are singletons. My App class looks like:

public partial class App
{
  private IContainer _container;
  
  public App()
  {
    InitializeComponent();
    ConfigureServices();

    MainPage = new NavigationPage(_container.Resolve<MainPage>());
  }

  private void ConfigureServices()
  {
    var builder = new ContainerBuilder();

    builder.RegisterType<MainPage>().SingleInstance();
    builder.RegisterType<SettingsPage>().SingleInstance();

    _container = builder.Build();
  }
}

The MainPage code to show SettingsPage looks like:

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MainPage
{
  private readonly SettingsPage _settingsPage;

  public MainPage(SettingsPage settingsPage)
  {
    InitializeComponent();
    _settingsPage = settingsPage;
  }

  private async void SettingsButton_OnClicked(object sender, EventArgs e)
  {
    await Navigation.PushAsync(_settingsPage);
  }
 }

In the SettingsPage I've added some kind of a frame using AiForms.Effects:

<ContentPage 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"
             x:Class="Tum4ik.RemoteControl.Client.SettingsPage"
             Title="Settings">

  <ef:Floating.Content>
    <ef:FloatingLayout>
      <ef:FloatingView VerticalLayoutAlignment="Fill" HorizontalLayoutAlignment="Fill">
        <StackLayout ef:Border.On="True"
                     ef:Border.Width="4"
                     ef:Border.Color="Red"/>
      </ef:FloatingView>
    </ef:FloatingLayout>
  </ef:Floating.Content>

  <ContentPage.Content>
    <ScrollView>
      <StackLayout>
        <Entry x:Name="ClientIdEntry" Placeholder="Client ID" />
        <Entry x:Name="ServerIpEntry" Placeholder="Server IP" />
        <Entry x:Name="ServerPortEntry" Placeholder="Server Port" />
        <Entry x:Name="UsernameEntry" Placeholder="Username" />
        <Entry x:Name="PasswordEntry" Placeholder="Password" />
      </StackLayout>
    </ScrollView>
  </ContentPage.Content>

</ContentPage>

So, when I go to the SettingsPage I see the frame. But if I go back to the MainPage and then again go to the SettingPage the frame disappears.
ezgif com-video-to-gif

Is that a bug or I am doing something wrong?

Android 5.0 (API-21) ToFlatButton crash

XF app with button.ToFlatButton.On=True work great on API > 21, but crashes on API-21.
There are a LOT of output in log related to this crash, but I think it's the reason:

09-27 19:31:50.481 3953-3953/com.liwm.android A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: can't call void android.view.View.setTranslationZ(float) on null object
09-27 19:31:50.481 3953-3953/com.liwm.android A/art: art/runtime/check_jni.cc:65] in call to CallVoidMethodV
09-27 19:31:50.481 3953-3953/com.liwm.android A/art: art/runtime/check_jni.cc:65] from void android.animation.PropertyValuesHolder.nCallFloatMethod(java.lang.Object, long, float)
09-27 19:31:50.481 3953-3953/com.liwm.android A/art: art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable

AndroidでSwichにAlterColorを使用するとSystem.ObjectDisposedExceptionが発生する

こんにちは。お疲れさまです。
Aiforms.Effectsを使わせて頂いております。
大変助かっています。ありがとうございます。

実機にてAndroidでSwichにAlterColorを使用し、
画面を移動すると(MainPageを書き換え もしくはバックボタンでアプリの終了)例外が発生してしまいます。
System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'Android.Graphics.Drawables.NinePatchDrawable'.'

使い方が悪いのでしょうか。
Xamlで以下の記述をしているだけです。

ご教授いただけると幸いです。
よろしくお願いいたします。

Shell flyout menu not selected item with ripple effect

Hi, I would like to ask if it is possible to apply the ripple effect to Shell FlyoutItem. The ripple effect works, but the menu item does not work, you cannot change the page. Advise if I'm making a mistake somewhere. I will be happy for any advice.

Steps to Reproduce

  1. Create a Shell project
  2. Create ItemTemplate in AppShell
  3. Add a ripple effect to the DataTemplate
    effects:Feedback.On="True"
    effects:Feedback.EffectColor="Red"

<FlyoutItem Title="Item 1"> <Shell.ItemTemplate> <DataTemplate> <ContentView> <Grid HeightRequest="50" effects:Feedback.On="True" effects:Feedback.EffectColor="Red"> </Grid> </ContentView> </DataTemplate> </Shell.ItemTemplate> <ShellContent Route="HomePage" ContentTemplate="{DataTemplate local:HomePage}" /> </FlyoutItem>

Expected Behavior

Ripple effect and go to the selection page from the shell menu

Actual Behavior

The ripple effect works, switching to another page does not work when selecting from the menu.

Platforms

  • Android
  • iOS

Basic Information

  • AiForms.Effects 1.6.10
  • Xamarin.Forms 4.8.0.1821
  • Android Support Library Version:
  • Affected Devices:

Screenshots

ezgif com-gif-maker (1)

Reproduction Link

Workaround

Border does not appear on iOS 13.4

Description

Border does not appear with any VisualElement on iOS 13.4. On 13.0 everything works well.

Expected Behavior

Actual Behavior

Platforms

  • Android
  • iOS

Basic Information

  • AiForms.Effects x.x.x
  • Xamarin.Forms x.x.x
  • Android Support Library Version:
  • Affected Devices:

Screenshots

Reproduction Link

Workaround

System.NullReferenceException on Android on page close

Hi!

Page consist of CollectionView with ContentView Items with ef.AddCommand.
On PopAsync (using FreshMvvm btw) app crashes. Android only, iOS - no problem.

Process: com.company.mobile, PID: 2026 android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object at AiForms.Effects.Droid.AiEffectBase+<>c__DisplayClass22_0.<BindingContextChanged>b__1 () [0x0000b] in <82332298958c45b498e83340cd785caa>:0 at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <e98afaf88af5496ea979d99b06e991b9>:0 at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <e98afaf88af5496ea979d99b06e991b9>:0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.43(intptr,intptr)

Crash on Android 4.4 (Java.Lang.NoSuchMethodException)

This library has API level 22 set as minimum.
This is absolutely ok, but it would be better if, when used on some minor platform, the app would not crash.
Other libraries handle this more gracefully by just disabling themselves if the API level is too low.
So in this case: we would have some ugly buttons, but the app would still work. ;-)

@bruzkovsky - might also be your issue


 UNHANDLED EXCEPTION:
11-06 17:50:28.070 I/MonoDroid( 5411): Java.Lang.NoSuchMethodError: no method with name='getStateListAnimator' signature='()Landroid/animation/StateListAnimator;' in class Landroid/view/View;
11-06 17:50:28.070 I/MonoDroid( 5411):   at Java.Interop.JniEnvironment+InstanceMethods.GetMethodID (Java.Interop.JniObjectReference type, System.String name, System.String signature) [0x0005b] in <bea5d01c4e184519b753620a0aaa9c67>:0 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Java.Interop.JniType.GetInstanceMethod (System.String name, System.String signature) [0x0000c] in <bea5d01c4e184519b753620a0aaa9c67>:0 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Java.Interop.JniPeerMembers+JniInstanceMethods.GetMethodInfo (System.String encodedMember) [0x00031] in <bea5d01c4e184519b753620a0aaa9c67>:0 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0001c] in <bea5d01c4e184519b753620a0aaa9c67>:0 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Android.Views.View.get_StateListAnimator () [0x0000a] in <e88bfb514a2a435cb900154e4ab621e8>:0 
11-06 17:50:28.070 I/MonoDroid( 5411):   at AiForms.Effects.Droid.ToFlatButtonPlatformEffect.OnAttached () [0x0003c] in <941053be526a4482b8e4d919d9699326>:0 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Effect.SendAttached () [0x00009] in D:\a\1\s\Xamarin.Forms.Core\Effect.cs:54 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.RoutingEffect.SendAttached () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\RoutingEffect.cs:29 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Element.AttachEffect (Xamarin.Forms.Effect effect) [0x00045] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:538 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Element.set_EffectControlProvider (Xamarin.Forms.IEffectControlProvider value) [0x0007c] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:256 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Internals.EffectUtilities.RegisterEffectControlProvider (Xamarin.Forms.IEffectControlProvider self, Xamarin.Forms.IElementController oldElement, Xamarin.Forms.IElementController newElement) [0x0001a] in D:\a\1\s\Xamarin.Forms.Core\Internals\EffectUtilities.cs:16 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00130] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:222 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:125 
In mgmain JNI_OnLoad11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:330 

11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:120 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00139] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:268 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:92 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:389 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000f2] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:214 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:125 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:330 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x000af] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:120 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00139] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:268 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:92 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00098] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:184 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.set_Element (Xamarin.Forms.Frame value) [0x00018] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:61 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00015] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:82 
11-06 17:50:28.070 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:330 
11-06 17:50:28.075 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.ViewCellRenderer.GetCellCore (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context) [0x0008f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Cells\ViewCellRenderer.cs:41 
11-06 17:50:28.075 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.CellRenderer.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context) [0x00075] in D:\a\1\s\Xamarin.Forms.Platform.Android\Cells\CellRenderer.cs:51 
11-06 17:50:28.075 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.CellFactory.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context, Xamarin.Forms.View view) [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.Android\Cells\CellFactory.cs:20 
11-06 17:50:28.075 I/MonoDroid( 5411):   at Xamarin.Forms.Platform.Android.ListViewAdapter.GetView (System.Int32 position, Android.Views.View convertView, Android.Views.ViewGroup parent) [0x00200] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\ListViewAdapter.cs:298 
11-06 17:50:28.075 I/MonoDroid( 5411):   at Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_ (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 position, System.IntPtr native_convertView, System.IntPtr native_parent) [0x0001a] in <e88bfb514a2a435cb900154e4ab621e8>:0 
11-06 17:50:28.075 I/MonoDroid( 5411):   at (wrapper dynamic-method) System.Object.98(intptr,intptr,int,intptr,intptr)
11-06 17:50:28.075 I/MonoDroid( 5411):   --- End of managed Java.Lang.NoSuchMethodError stack trace ---
11-06 17:50:28.075 I/MonoDroid( 5411): java.lang.NoSuchMethodError: no method with name='getStateListAnimator' signature='()Landroid/animation/StateListAnimator;' in class Landroid/view/View;
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.ListViewAdapter.n_getView(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.ListViewAdapter.getView(ListViewAdapter.java:100)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:230)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.AbsListView.obtainView(AbsListView.java:2305)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.ListView.makeAndAddView(ListView.java:1794)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.ListView.fillDown(ListView.java:695)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.ListView.fillFromTop(ListView.java:756)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.ListView.layoutChildren(ListView.java:1634)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.AbsListView.onLayout(AbsListView.java:2129)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:611)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.ListViewRenderer.n_onLayout(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.ListViewRenderer.onLayout(ListViewRenderer.java:65)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:37)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.n_onLayout(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:81)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:37)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.NavigationPageRenderer.n_onLayout(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.NavigationPageRenderer.onLayout(NavigationPageRenderer.java:65)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:37)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.MasterDetailContainer.n_onLayout(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.MasterDetailContainer.onLayout(MasterDetailContainer.java:45)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1172)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.MasterDetailPageRenderer.n_onLayout(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.MasterDetailPageRenderer.onLayout(MasterDetailPageRenderer.java:68)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.Platform_ModalContainer.n_onLayout(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md58432a647068b097f9637064b8985a5e0.Platform_ModalContainer.onLayout(Platform_ModalContainer.java:45)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.PlatformRenderer.n_onLayout(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at md51558244f76c53b6aeda52c8a337f2c37.PlatformRenderer.onLayout(PlatformRenderer.java:55)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1697)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1551)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1460)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.View.layout(View.java:14873)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewGroup.layout(ViewGroup.java:4651)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2061)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1815)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1042)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5905)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:780)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.Choreographer.doCallbacks(Choreographer.java:593)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.Choreographer.doFrame(Choreographer.java:562)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:766)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.os.Handler.handleCallback(Handler.java:733)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.os.Handler.dispatchMessage(Handler.java:95)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.os.Looper.loop(Looper.java:136)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at android.app.ActivityThread.main(ActivityThread.java:5314)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at java.lang.reflect.Method.invoke(Method.java:515)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
11-06 17:50:28.075 I/MonoDroid( 5411): 	at dalvik.system.NativeStart.main(Native Method)
11-06 17:50:28.125 W/dalvikvm( 5411): JNI WARNING: JNI function CallObjectMethodA called with exception pending
11-06 17:50:28.125 W/dalvikvm( 5411):              in Lmd51558244f76c53b6aeda52c8a337f2c37/ListViewAdapter;.n_getView:(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View; (CallObjectMethodA)

AddDatePicker crashes on old iOS versions

Description

Starting release 1.6.9 using of AddDatePicker crashes app on old iOS versions with:

Foundation.MonoTouchException: 'Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIDatePicker setPreferredDatePickerStyle:]: unrecognized selector sent

Tried iOS 10.3, 11.2.6...

Steps to Reproduce

  1. Use AddDatePicker on page
  2. Start app on iOS 10.3
  3. See the crash

Expected Behavior

No crash

Actual Behavior

Crash

Platforms

  • Android
  • iOS

Basic Information

  • AiForms.Effects 1.6.9
  • Xamarin.Forms x.x.x
  • Android Support Library Version:
  • Affected Devices:

Screenshots

Reproduction Link

Workaround

No workaround.
Prev. versions has AddDatePicker problem with iOS 14, 1.6.9 - with prev. iOS versions :(

CanExecuteのチェック

Command / LongCommandの実行時にCanExecueのチェックをおこなっていない実装ですが
何か特別が理由があるのでしょうか?

Android SizeToFit Crash

I was using SizeToFit for Xamarin.Forms and it worked on both iOS and Android. But when I updated Xamarin.Forms, the Android version crashes when an object uses SizeToFit.
The stack trace is this:

Xamarin Exception Stack:
System.NullReferenceException: Object reference not set to an instance of an object.
  at AiForms.Effects.Droid.SizeToFitPlatformEffect.UpdateFitFont () [0x0012e] in <526f20f05dea47db93e1c1c05fbaf7b4>:0
  at AiForms.Effects.Droid.SizeToFitPlatformEffect.OnElementPropertyChanged (System.ComponentModel.PropertyChangedEventArgs args) [0x0006c] in <526f20f05dea47db93e1c1c05fbaf7b4>:0
  at Xamarin.Forms.PlatformEffect`2[TContainer,TControl].SendOnElementPropertyChanged (System.ComponentModel.PropertyChangedEventArgs args) [0x00008] in D:\a\1\s\Xamarin.Forms.Core\PlatformEffect.cs:31
  at Xamarin.Forms.RoutingEffect.SendOnElementPropertyChanged (System.ComponentModel.PropertyChangedEventArgs args) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\RoutingEffect.cs:39
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x0007a] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:366
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00114] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:443
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:379
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:316
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindablePropertyKey propertyKey, System.Object value) [0x0000e] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:300
  at Xamarin.Forms.VisualElement.set_Height (System.Double value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:315
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x0001a] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1021
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:307
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:178
  at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00144] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:49
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1023
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:307
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:178
  at Xamarin.Forms.TemplatedView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:27
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1023
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:307
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.View child, Xamarin.Forms.Rectangle region, Xamarin.Forms.SizeRequest childSizeRequest) [0x00225] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:319
  at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00079] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:65
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1023
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:307
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.View child, Xamarin.Forms.Rectangle region, Xamarin.Forms.SizeRequest childSizeRequest) [0x00225] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:319
  at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00079] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:65
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1023
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:307
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:178
  at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00144] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:49
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1023
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:307
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.View child, Xamarin.Forms.Rectangle region, Xamarin.Forms.SizeRequest childSizeRequest) [0x00225] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:319
  at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00079] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:65
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1023
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:307
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:686
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:178
  at Xamarin.Forms.ScrollView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x000f4] in D:\a\1\s\Xamarin.Forms.Core\ScrollView.cs:231
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:784
  at Xamarin.Forms.Layout+<>c.<OnChildMeasureInvalidated>b__45_0 () [0x00080] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:381
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <289faaef20de42089854c8bef59604fd>:0
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <289faaef20de42089854c8bef59604fd>:0
  at (wrapper dynamic-method) System.Object.13(intptr,intptr)

RepeatableStack resizes items while loading

Using RepeatableStack, and load the items one by one, I see an ugly effect, the items gets its width resized every time a new item gets added. How could I prevent this? Am I doing something wrong?
Thank you in advance.

PlaySound not working for controls with EnableSound true

I tried adding ef:Feedback.EnableSound="True" to a button in my view, and I didn't hear anything.

With the current expression in PlaySound(), only controls in the TapSoundEffectElementType list are allowed to play:
if (_isTapTargetSoundEffect && _enableSound)

If I made this change, then the sound worked for my buttons:
if (_isTapTargetSoundEffect || _enableSound)

I need ef:Feedback.EnableSound for buttons and other items in my views. Could this fix to PlaySound() be done?

AndroidのAddText機能で文字が途切れる

こんにちは。こちらのライブラリを自作アプリに使わせていただいております。

エラーメッセージの表示にAddText機能を使用していますが、Androidの実機で確認すると、文字数が4文字の場合に「必須項…」のように途切れていました。
エミュレータで確認した場合は途切れずに表示されました。

【参考画像】
Screenshot_20191025-200504-2

Usage in code behind c#

Hi there I am trying to add your your effects for the AddNumberPicker(), you have examples in XAML, can it be used in c#? If so how? I try something like this based on your xaml but getting error:

Button buttonAddQuantity = new Button()
            {
                AiForms.Effects.AddNumberPicker.SetOn(this,true),
            };

The "LinkAssemblies" task failed unexpectedly.

While running in release mode, linking the assemblies am unable to run project with this nuget package.
Can you advice me the fix, for this issue. Pasting error below.

Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.Void AiForms.Effects.Droid.ToFlatButtonPlatformEffect::OnElementPropertyChanged(System.ComponentModel.PropertyChangedEventArgs)' in assembly: 'AiForms.Effects.Droid.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Xamarin.Forms.BindableProperty Xamarin.Forms.Button::CornerRadiusProperty
at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()System.Void AiForms.Effects.Droid.ToFlatButtonPlatformEffect::OnElementPropertyChanged
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() MS.Digital.BOD.Android

selecteable label effect

Could you add an effect that make label control can be selected and then copy, paste options appear.
thanks very much.😁

Lower than Android 5.0 Crash

BorderPlatformEffect.UpdateBorder ()
Java.Lang.IncompatibleClassChangeError: no method with name='setClipToOutline' signature='(Z)V' in class Lcom/xamarin/forms/platform/android/FormsViewGroup;

The ClipToOutline method is only available after Android 5.0.

AiForms.EffectsのFeedbackの動作について

Description

こんにちは。
AiFormsシリーズを使わせて頂いています。AndroidとiOSで開発を行っています。
AiForms.Dialogsでダイアログ内で、AiForms.Effectsを使用した場合のFeedbackの動作についてと、色々なコントローラーで使用した場合の動作を報告します。
すべてのコントローラーで使用したわけではなく、あくまで私の使用した範囲ですが。
先ずは、AiForms.Dialogsで使用した場合の方から。
ダイアログ内のButtonにef:Feedback.EnableSound="true"と追加し、タップしたら音を出す様にします。
Androidではボタンをタップすると音が出て、タップ状態になります。
iOSではタップ音はしますが、ボタンがタップ状態になりません(ボタンが押されない)。
Reproduceの方をご参照ください。

そのほか、こちらの環境ではNavigation.PushModalAsyncで生成されたページ内でFeedbackを使用した場合も上記と同様の結果になりました。

私はImageButtonを使って、フローティングボタンを表示させていますが(下記のコード)、同様に音のみでイベントが飛びません。

<!-- フローティングボタン -->
<ImageButton Grid.Row="1" BorderWidth="1" Source="icon_pencil_dark.png"
		BorderColor="Transparent" BackgroundColor="{StaticResource WriteEventButtonColor}"
                ef:Feedback.EnableSound="True" ef:Feedback.On="True"
                CornerRadius="23" WidthRequest="45" HeightRequest="45" Margin="0,0,15,38" HorizontalOptions="End" VerticalOptions="End"
                Command="{Binding RecordCommand}" />

それから、SettingsView内のCommandCellで使用した場合、イベントは飛びますがiOSでは音が出ません。

<sv:CommandCell Title="{Binding CareText}" TitleFontSize="Body" Height="40"
		TitleFontAttributes="Bold" Command="{Binding OnCareLabelTapped}"
                BackgroundColor="{AppThemeBinding Light={StaticResource ListBackgroundColor2Light},
                                  Dark={StaticResource ListBackgroundColor2Dark}}"
                TitleColor="{AppThemeBinding Light={StaticResource TextColorLight}, Dark={StaticResource TextColorDark}}"
                ef:Feedback.EnableSound="True" ef:Feedback.On="True" />

使い方の問題かもしれませんが、何か情報をいただきたくお願いします。

Steps to Reproduce

  1. AiForms.DialogのSampleプログラムのMyDialogView.xamlでbuttonにFeedbackを追加する。
<?xml version="1.0" encoding="UTF-8"?>
<extra:DialogView
    xmlns="http://xamarin.com/schemas/2014/forms" 
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
    xmlns:extra="clr-namespace:AiForms.Dialogs.Abstractions;assembly=AiForms.Dialogs.Abstractions"
    xmlns:ef="clr-namespace:AiForms.Effects;assembly=AiForms.Effects"
    xmlns:sv="clr-namespace:AiForms.Renderers;assembly=SettingsView"
    x:Class="Sample.Views.MyDialogView"
    CornerRadius="10" OffsetX="{Binding OffsetX}" OffsetY="{Binding OffsetY}" UseCurrentPageLocation="{Binding IsPageLocation}"
    VerticalLayoutAlignment="{Binding VAlign}" HorizontalLayoutAlignment="{Binding HAlign}" >
    <!-- HeightRequest="{Binding VisibleContentHeight,Source={x:Reference Settings}}" -->

    <ContentView BackgroundColor="#CC9900" x:Name="container" Padding="12">
        <StackLayout WidthRequest="200" BackgroundColor="White" >
            <Label Text="{Binding Title}" TextColor="#FFBF00" HorizontalTextAlignment="Center" Margin="6" x:Name="title" />
            <Label Text="{Binding Description}" LineBreakMode="WordWrap" x:Name="desc"
                       TextColor="#666666" Margin="6" VerticalTextAlignment="Center"   />
            <StackLayout Orientation="Horizontal">
                <Button Text="Cancel" Clicked="Handle_Cancel_Clicked" TextColor="#FFBF00" 
                        ef:Feedback.EnableSound="True"
                        Padding="0" BackgroundColor="Transparent" HorizontalOptions="FillAndExpand"/>
                <Button Text="OK" Clicked="Handle_OK_Clicked" TextColor="#FFBF00" 
                        ef:Feedback.EnableSound="True"
                        Padding="0" BackgroundColor="Transparent" HorizontalOptions="FillAndExpand" />
            </StackLayout>
         </StackLayout>
    </ContentView>
    <!--<sv:SettingsView x:Name="Settings" WidthRequest="200"  HeaderHeight="30" RowHeight="40" HasUnevenRows="false"
         BackgroundColor="#EFEFEF" CellBackgroundColor="White">
        <sv:Section Title="1行に表示する教材の数" sv:RadioCell.SelectedValue="1">
            <sv:RadioCell Title="A" Value="1" />
            <sv:RadioCell Title="B" Value="2" />
            <sv:RadioCell Title="B" Value="3" />
        </sv:Section>
    </sv:SettingsView>-->
</extra:DialogView>
  1. Androidの実機、iOSの実機(iPhone)でプログラムを実行し、MainPage→DialogをタップしてDialogを表示させる。
  2. Cancel又はOKをタップする。Androidの実機では音が出てDialogが消えるが、iOSの実機ではタップ音はするがボタンがタップされない(Dialogが消えない)。
  3. 念のためにMyDialogView.xaml.csのHandle_OK_Clicked、Handle_Cancel_Clickedにブレークポイントを設定してイベントが飛ぶか確認したところ、iOSでは飛んでこない。

Expected Behavior

iOSでも、Androidと同じ音が出てDialogが消え、イベントが飛んでくる動作。

Actual Behavior

iOSの実機ではタップ音はするがボタンがタップされない。イベントも飛ばない。

Platforms

  • Android 9
  • iOS 12.5.5, 13.3.1, 14.8.1, 15.0.1

Basic Information

  • AiForms.SettingsView 1.3.29
  • AiForms.Dialogs 1.0.13
  • AiForms.Effects 1.6.11
  • Xamarin.Forms 5.0.0.2196, 5.0.0.2244
  • Android Support Library Version:
  • Affected Devices:iPhone Series

Workaround

無し

カスタムレンダラーを使いAndroidでのImageViewにもToFlatButtonを適用することはできますか?

こんにちは。こちらのライブラリを有りがたく使わせていただいております。
(英語が苦手なので日本語で失礼します)

Xamarin.Formsの標準の使い方ではないのですが、
ButtonにImageを入れたかったのでカスタムレンダラーでAppCompatImageButtonを使うようにしており、その上でこちらのライブラリの恩恵も受けたいと思っていたのですがAppCompatButtonでしか適用されないようで(さらにOnDettach時に落ちる)、
もしよろしければAppCompatImageButtonでも枠線や背景などを変更できるようにご検討できないでしょうか?

AndroidではImageButtonとButtonは継承関係になっていないのがネックかと思われ、
実現できるかどうかもわかりませんが、ご検討いただければ幸いです。

AddDatePicker on iOS - sticky calendar

Description

If you tap outside of a calendar, not on Cancel or Done, it may stick on screen without Cancel/Done line.

Steps to Reproduce

Expected Behavior

The calendar should disappear on click outside of.

Actual Behavior

Platforms

  • Android
  • iOS

Basic Information

  • AiForms.Effects 1.6.7
  • Xamarin.Forms 4.4.0.991757
  • Android Support Library Version:
  • Affected Devices:

Screenshots

image

Reproduction Link

Workaround

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.