Skip to content

Commit c315c89

Browse files
committed
Code review fixes
1 parent b6854ab commit c315c89

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

src/Controls/tests/TestCases.HostApp/Issues/Issue26908.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,25 @@ public class Issue26908 : TestContentPage
77
protected override void Init()
88
{
99
var timePicker = new TimePicker();
10-
var focusedLabel = new Label
10+
var statusLabel = new Label
1111
{
12-
AutomationId = "FocusedLabel",
13-
Text = "The time picker was focused",
14-
IsVisible = false,
15-
};
16-
17-
var unfocusedLabel = new Label
18-
{
19-
AutomationId = "UnfocusedLabel",
20-
Text = "The time picker was unfocused",
21-
IsVisible = false,
12+
AutomationId = "StatusLabel",
2213
};
2314

2415
timePicker.Focused += (s, e) =>
2516
{
26-
focusedLabel.IsVisible = true;
17+
statusLabel.Text += "Focused";
2718
timePicker.Unfocus();
2819
};
2920

30-
timePicker.Unfocused += (s, e) => unfocusedLabel.IsVisible = true;
21+
timePicker.Unfocused += (s, e) => statusLabel.Text += "Unfocused";
3122

3223
Content = new StackLayout
3324
{
3425
Children =
3526
{
3627
timePicker,
37-
focusedLabel,
38-
unfocusedLabel,
28+
statusLabel,
3929
new Button()
4030
{
4131
Text = "Focus",

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue26908.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ public void FocusAndUnfocusEventsShouldWork()
1818
{
1919
App.WaitForElement("FocusButton");
2020
App.Click("FocusButton");
21-
App.WaitForElement("FocusedLabel");
22-
App.WaitForElement("UnfocusedLabel");
21+
22+
string text = App.FindElement("StatusLabel").GetText()!;
23+
Assert.That(text, Is.EqualTo("FocusedUnfocused"));
2324
}
2425
}
2526
}

src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static void MapTextColor(ITimePickerHandler handler, ITimePicker timePick
102102
handler.PlatformView?.UpdateTextColor(timePicker);
103103
}
104104

105-
internal void ShowPickerDialog()
105+
void ShowPickerDialog()
106106
{
107107
if (VirtualView == null)
108108
return;
@@ -121,7 +121,7 @@ void ShowPickerDialog(int hour, int minute)
121121
VirtualView.IsFocused = true;
122122
}
123123

124-
internal void HidePickerDialog()
124+
void HidePickerDialog()
125125
{
126126
if (_dialog != null)
127127
{

0 commit comments

Comments
 (0)