diff --git a/AiForms.Effects.Droid/AddCommandPlatformEffect.cs b/AiForms.Effects.Droid/AddCommandPlatformEffect.cs index 086f03c..f1cd481 100644 --- a/AiForms.Effects.Droid/AddCommandPlatformEffect.cs +++ b/AiForms.Effects.Droid/AddCommandPlatformEffect.cs @@ -58,12 +58,13 @@ protected override void OnAttachedOverride() _view.Clickable = true; _view.LongClickable = true; - + UpdateSyncCanExecute(); UpdateCommandParameter(); UpdateLongCommandParameter(); + UpdateIsEnabled(); - _view.Touch += _view_Touch; + _view.Touch += _view_Touch; } protected override void OnDetachedOverride() diff --git a/AiForms.Effects.Droid/FeedbackPlatformEffect.cs b/AiForms.Effects.Droid/FeedbackPlatformEffect.cs index 53b8fd2..e026972 100644 --- a/AiForms.Effects.Droid/FeedbackPlatformEffect.cs +++ b/AiForms.Effects.Droid/FeedbackPlatformEffect.cs @@ -180,7 +180,7 @@ void UpdateEnableSound() _enableSound = GetEnableSound(); } - void UpdateIsEnabled() + protected void UpdateIsEnabled() { if(!IsClickable) { diff --git a/Tests/AiEffects.TestApp/AiEffects.TestApp/ViewModels/ForInvestigationViewModel.cs b/Tests/AiEffects.TestApp/AiEffects.TestApp/ViewModels/ForInvestigationViewModel.cs index 84b7456..0cb1a7a 100644 --- a/Tests/AiEffects.TestApp/AiEffects.TestApp/ViewModels/ForInvestigationViewModel.cs +++ b/Tests/AiEffects.TestApp/AiEffects.TestApp/ViewModels/ForInvestigationViewModel.cs @@ -10,37 +10,27 @@ namespace AiEffects.TestApp.ViewModels public class ForInvestigationViewModel { public ReactivePropertySlim BackColor { get; } = new ReactivePropertySlim(); - public List ItemsSource { get; set; } = new List(); - + public ReactiveCommand GoCommand { get; set; } = new ReactiveCommand(); - public ReactiveCommand CellCommand { get; set; } = new ReactiveCommand(); + public ReactiveCommand HogeCommand { get; set; } + + public ReactivePropertySlim CanExecute { get; } = new ReactivePropertySlim(); public ForInvestigationViewModel(INavigationService navigationService) { BackColor.Value = Color.Blue; - - ItemsSource.Add("ABC"); - ItemsSource.Add("CC"); - ItemsSource.Add("DD"); - ItemsSource.Add("EEE"); - ItemsSource.Add("FFF"); - ItemsSource.Add("GADSFS"); - ItemsSource.Add("HDSGDG"); - ItemsSource.Add("IGDG"); - ItemsSource.Add("YYUY"); - ItemsSource.Add("XXX"); + var toggle = false; GoCommand.Subscribe(async _ => { - //BackColor.Value = toggle ? Color.Blue : Color.Green; - //toggle = !toggle; - //await navigationService.NavigateAsync("MainPage",null,true); - await navigationService.GoBackAsync(); + CanExecute.Value = !CanExecute.Value; }); - CellCommand.Subscribe(_ => + HogeCommand = CanExecute.ToReactiveCommand(); + + HogeCommand.Subscribe(_ => { Debug.WriteLine("Cell Tap!"); }); diff --git a/Tests/AiEffects.TestApp/AiEffects.TestApp/Views/ForInvestigation.xaml b/Tests/AiEffects.TestApp/AiEffects.TestApp/Views/ForInvestigation.xaml index 9fc6b3e..ab8f2b6 100644 --- a/Tests/AiEffects.TestApp/AiEffects.TestApp/Views/ForInvestigation.xaml +++ b/Tests/AiEffects.TestApp/AiEffects.TestApp/Views/ForInvestigation.xaml @@ -7,17 +7,13 @@ x:Name="me"> - + - - - - - - - - - + + diff --git a/nuget/AzurePipelines.nuspec b/nuget/AzurePipelines.nuspec index f3a35d4..19e8d3c 100644 --- a/nuget/AzurePipelines.nuspec +++ b/nuget/AzurePipelines.nuspec @@ -19,6 +19,7 @@ ## Bug fixes +* AddCommand – Fixed AddCommand.SyncCanExecute does not work on Android #53 * Android – Fixed null exception when popping a page. #54 * AddText – Fixed the end of characters is sometimes omitted #48. * Feedback – Fixed Android OnOverlayTouch crash #49.