Skip to content

Commit 5825d70

Browse files
authored
[Android][Entry][Editor] Fixed potential crash. (#812)
1 parent 34a6dc2 commit 5825d70

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [55.2.3]
2+
- [Android][Entry][Editor] Fixed potential crash.
3+
14
## [55.2.2]
25
- [iOS26][Tip] Added more padding.
36

src/app/Playground/VetleSamples/VetlePage.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030

3131
<dui:VerticalStackLayout>
3232
<dui:Entry BackgroundColor="Green"></dui:Entry>
33+
<dui:Entry BackgroundColor="Green" HasBorder="True"></dui:Entry>
3334
<dui:SearchBar ReturnKeyType="Done" />
3435
<dui:Editor></dui:Editor>
36+
<dui:Editor HasBorder="True"></dui:Editor>
3537
</dui:VerticalStackLayout>
3638

3739
</dui:ContentPage>

src/library/DIPS.Mobile.UI/Components/TextFields/Editor/Android/EditorHandler.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Android.Graphics.Drawables;
2-
using AndroidX.AppCompat.Widget;
32
using DIPS.Mobile.UI.Components.BottomSheets.Android;
43
using Microsoft.Maui.Controls.Platform;
54
using Microsoft.Maui.Platform;
@@ -47,9 +46,8 @@ private static partial void MapShouldSelectTextOnTapped(EditorHandler handler, E
4746
handler.PlatformView.SetSelectAllOnFocus(entry.ShouldSelectAllTextOnFocused);
4847
}
4948

50-
private static async partial void MapHasBorder(EditorHandler handler, Editor entry)
49+
private static partial void MapHasBorder(EditorHandler handler, Editor entry)
5150
{
52-
await Task.Delay(1);
5351
handler.PlatformView.SetBackground(entry.HasBorder ? handler.DefaultBackground : null);
5452
}
5553

src/library/DIPS.Mobile.UI/Components/TextFields/Entry/Android/EntryHandler.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
using Android.Graphics.Drawables;
22
using Android.Widget;
3-
using AndroidX.AppCompat.Widget;
43
using DIPS.Mobile.UI.Components.BottomSheets.Android;
54
using Microsoft.Maui.Controls.Platform;
65
using Microsoft.Maui.Platform;
7-
using Object = Java.Lang.Object;
86
using View = Android.Views.View;
97

108
namespace DIPS.Mobile.UI.Components.TextFields.Entry;
@@ -54,9 +52,8 @@ private static partial void MapShouldSelectTextOnTapped(EntryHandler handler, En
5452
handler.PlatformView.SetSelectAllOnFocus(entry.ShouldSelectAllTextOnFocused);
5553
}
5654

57-
private static async partial void MapHasBorder(EntryHandler handler, Entry entry)
55+
private static partial void MapHasBorder(EntryHandler handler, Entry entry)
5856
{
59-
await Task.Delay(1);
6057
handler.PlatformView.SetBackground(entry.HasBorder ? handler.DefaultBackground : null);
6158
}
6259

0 commit comments

Comments
 (0)