Skip to content

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

@kuririn2001

Description

@kuririn2001

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

無し

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions