diff --git a/widget/check.go b/widget/check.go index b8c0ce3253..22cf72d465 100644 --- a/widget/check.go +++ b/widget/check.go @@ -138,12 +138,8 @@ func (c *Check) Tapped(pe *fyne.PointEvent) { return } - if !c.focused && !fyne.CurrentDevice().IsMobile() { - impl := c.super() - - if c := fyne.CurrentApp().Driver().CanvasForObject(impl); c != nil { - c.Focus(impl.(fyne.Focusable)) - } + if !c.focused { + focusIfNotMobile(c.super()) } c.SetChecked(!c.Checked) } @@ -382,3 +378,12 @@ func (c *checkRenderer) updateFocusIndicator(th fyne.Theme, v fyne.ThemeVariant) c.focusIndicator.FillColor = color.Transparent } } + +func focusIfNotMobile(w fyne.Widget) { + if !fyne.CurrentDevice().IsMobile() { + if c := fyne.CurrentApp().Driver().CanvasForObject(w); c != nil { + c.Focus(w.(fyne.Focusable)) + } + } + +} diff --git a/widget/radio_item.go b/widget/radio_item.go index 8fd24d5acd..fbcf075eb1 100644 --- a/widget/radio_item.go +++ b/widget/radio_item.go @@ -105,12 +105,8 @@ func (i *radioItem) SetSelected(selected bool) { // // Implements: fyne.Tappable func (i *radioItem) Tapped(_ *fyne.PointEvent) { - if !i.focused && !fyne.CurrentDevice().IsMobile() { - impl := i.super() - - if c := fyne.CurrentApp().Driver().CanvasForObject(impl); c != nil { - c.Focus(impl.(fyne.Focusable)) - } + if !i.focused { + focusIfNotMobile(i.super()) } i.toggle() } diff --git a/widget/select.go b/widget/select.go index d0e36abccc..c1ac6114a4 100644 --- a/widget/select.go +++ b/widget/select.go @@ -200,6 +200,10 @@ func (s *Select) Tapped(*fyne.PointEvent) { return } + if !s.focused { + focusIfNotMobile(s.super()) + } + s.tapAnimation() s.Refresh() diff --git a/widget/select_internal_test.go b/widget/select_internal_test.go index a030e15035..218352b284 100644 --- a/widget/select_internal_test.go +++ b/widget/select_internal_test.go @@ -47,11 +47,16 @@ func TestSelectRenderer_TapAnimation(t *testing.T) { sel.Resize(sel.MinSize()) sel.Refresh() + path := "select/desktop/tap_animation.png" + if fyne.CurrentDevice().IsMobile() { + path = "select/mobile/tap_animation.png" + } + render1 := test.WidgetRenderer(sel).(*selectRenderer) test.Tap(sel) sel.popUp.Hide() sel.tapAnim.Tick(0.5) - test.AssertImageMatches(t, "select/tap_animation.png", w.Canvas().Capture()) + test.AssertImageMatches(t, path, w.Canvas().Capture()) cache.DestroyRenderer(sel) sel.Refresh() @@ -63,5 +68,5 @@ func TestSelectRenderer_TapAnimation(t *testing.T) { test.Tap(sel) sel.popUp.Hide() sel.tapAnim.Tick(0.5) - test.AssertImageMatches(t, "select/tap_animation.png", w.Canvas().Capture()) + test.AssertImageMatches(t, path, w.Canvas().Capture()) } diff --git a/widget/select_test.go b/widget/select_test.go index ac97654d09..3bf972628f 100644 --- a/widget/select_test.go +++ b/widget/select_test.go @@ -1,6 +1,8 @@ package widget_test import ( + "fmt" + "image" "testing" "time" @@ -35,11 +37,11 @@ func TestSelect_Align(t *testing.T) { c := fyne.CurrentApp().Driver().CanvasForObject(sel) test.Tap(sel) - test.AssertRendersToMarkup(t, "select/center.xml", c) + assertRendersToPlatformMarkup(t, "select/%s/center.xml", c) sel.Alignment = fyne.TextAlignTrailing sel.Refresh() - test.AssertRendersToMarkup(t, "select/trailing.xml", c) + assertRendersToPlatformMarkup(t, "select/%s/trailing.xml", c) } func TestSelect_ChangeTheme(t *testing.T) { @@ -54,13 +56,13 @@ func TestSelect_ChangeTheme(t *testing.T) { combo.Move(fyne.NewPos(10, 10)) test.Tap(combo) - test.AssertImageMatches(t, "select/theme_initial.png", w.Canvas().Capture()) + assertImageMatchesPlatform(t, "select/%s/theme_initial.png", w.Canvas().Capture()) test.WithTestTheme(t, func() { combo.Resize(combo.MinSize()) combo.Refresh() time.Sleep(100 * time.Millisecond) - test.AssertImageMatches(t, "select/theme_changed.png", w.Canvas().Capture()) + assertImageMatchesPlatform(t, "select/%s/theme_changed.png", w.Canvas().Capture()) }) } @@ -295,10 +297,10 @@ func TestSelect_Move(t *testing.T) { test.AssertRendersToMarkup(t, "select/move_initial.xml", w.Canvas()) combo.Tapped(&fyne.PointEvent{}) - test.AssertRendersToMarkup(t, "select/move_tapped.xml", w.Canvas()) + assertRendersToPlatformMarkup(t, "select/%s/move_tapped.xml", w.Canvas()) combo.Move(fyne.NewPos(20, 20)) - test.AssertRendersToMarkup(t, "select/move_moved.xml", w.Canvas()) + assertRendersToPlatformMarkup(t, "select/%s/move_moved.xml", w.Canvas()) } func TestSelect_PlaceHolder(t *testing.T) { @@ -427,7 +429,7 @@ func TestSelect_Tapped(t *testing.T) { test.Tap(combo) canvas := fyne.CurrentApp().Driver().CanvasForObject(combo) assert.Equal(t, 1, len(canvas.Overlays().List())) - test.AssertRendersToMarkup(t, "select/tapped.xml", w.Canvas()) + assertRendersToPlatformMarkup(t, "select/%s/tapped.xml", w.Canvas()) } func TestSelect_Tapped_Constrained(t *testing.T) { @@ -444,7 +446,7 @@ func TestSelect_Tapped_Constrained(t *testing.T) { combo.Move(fyne.NewPos(canvas.Size().Width-10, canvas.Size().Height-10)) test.Tap(combo) assert.Equal(t, 1, len(canvas.Overlays().List())) - test.AssertRendersToMarkup(t, "select/tapped_constrained.xml", w.Canvas()) + assertRendersToPlatformMarkup(t, "select/%s/tapped_constrained.xml", w.Canvas()) } func TestSelect_Layout(t *testing.T) { @@ -554,9 +556,29 @@ func TestSelect_Layout(t *testing.T) { } window.Resize(combo.MinSize().Max(fyne.NewSize(150, 200))) - test.AssertRendersToMarkup(t, "select/layout_"+name+".xml", window.Canvas()) + assertRendersToPlatformMarkup(t, "select/%s/layout_"+name+".xml", window.Canvas()) window.Close() }) } } + +func assertRendersToPlatformMarkup(t *testing.T, file string, c fyne.Canvas) { + platform := "desktop" + if fyne.CurrentDevice().IsMobile() { + platform = "mobile" + } + + path := fmt.Sprintf(file, platform) + test.AssertRendersToMarkup(t, path, c) +} + +func assertImageMatchesPlatform(t *testing.T, file string, i image.Image) { + platform := "desktop" + if fyne.CurrentDevice().IsMobile() { + platform = "mobile" + } + + path := fmt.Sprintf(file, platform) + test.AssertImageMatches(t, path, i) +} diff --git a/widget/slider.go b/widget/slider.go index 8b000be512..6601139684 100644 --- a/widget/slider.go +++ b/widget/slider.go @@ -114,13 +114,8 @@ func (s *Slider) Tapped(e *fyne.PointEvent) { return } - driver := fyne.CurrentApp().Driver() - if !s.focused && !driver.Device().IsMobile() { - impl := s.super() - - if c := driver.CanvasForObject(impl); c != nil { - c.Focus(impl.(fyne.Focusable)) - } + if !s.focused { + focusIfNotMobile(s.super()) } ratio := s.getRatio(e) diff --git a/widget/slider_test.go b/widget/slider_test.go index 4dcc473a2a..8521ebed30 100644 --- a/widget/slider_test.go +++ b/widget/slider_test.go @@ -290,9 +290,20 @@ func TestSlider_SetValue(t *testing.T) { assert.Equal(t, 2.0, slider.Value) } +func TestSlider_FocusDesktop(t *testing.T) { + if fyne.CurrentDevice().IsMobile() { + return + } + slider := NewSlider(0, 10) + win := test.NewWindow(slider) + test.Tap(slider) + + assert.Equal(t, win.Canvas().Focused(), slider) + assert.True(t, slider.focused) +} + func TestSlider_Focus(t *testing.T) { slider := NewSlider(0, 5) - slider.FocusGained() assert.True(t, slider.focused) diff --git a/widget/testdata/select/desktop/center.xml b/widget/testdata/select/desktop/center.xml new file mode 100644 index 0000000000..6e23bfebf4 --- /dev/null +++ b/widget/testdata/select/desktop/center.xml @@ -0,0 +1,42 @@ + + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + + Hi + + + + + + + + diff --git a/widget/testdata/select/layout_empty.xml b/widget/testdata/select/desktop/layout_empty.xml similarity index 100% rename from widget/testdata/select/layout_empty.xml rename to widget/testdata/select/desktop/layout_empty.xml diff --git a/widget/testdata/select/desktop/layout_empty_expanded.xml b/widget/testdata/select/desktop/layout_empty_expanded.xml new file mode 100644 index 0000000000..89a1c91202 --- /dev/null +++ b/widget/testdata/select/desktop/layout_empty_expanded.xml @@ -0,0 +1,39 @@ + + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/widget/testdata/select/desktop/layout_empty_expanded_placeholder.xml b/widget/testdata/select/desktop/layout_empty_expanded_placeholder.xml new file mode 100644 index 0000000000..eac90703e0 --- /dev/null +++ b/widget/testdata/select/desktop/layout_empty_expanded_placeholder.xml @@ -0,0 +1,39 @@ + + + + + + + + (Pick 1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/widget/testdata/select/layout_empty_placeholder.xml b/widget/testdata/select/desktop/layout_empty_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_empty_placeholder.xml rename to widget/testdata/select/desktop/layout_empty_placeholder.xml diff --git a/widget/testdata/select/layout_multiple.xml b/widget/testdata/select/desktop/layout_multiple.xml similarity index 100% rename from widget/testdata/select/layout_multiple.xml rename to widget/testdata/select/desktop/layout_multiple.xml diff --git a/widget/testdata/select/desktop/layout_multiple_expanded.xml b/widget/testdata/select/desktop/layout_multiple_expanded.xml new file mode 100644 index 0000000000..ffd188cc5e --- /dev/null +++ b/widget/testdata/select/desktop/layout_multiple_expanded.xml @@ -0,0 +1,45 @@ + + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + + Foo + + + Bar + + + + + + + + diff --git a/widget/testdata/select/desktop/layout_multiple_expanded_placeholder.xml b/widget/testdata/select/desktop/layout_multiple_expanded_placeholder.xml new file mode 100644 index 0000000000..4cb46a4b0f --- /dev/null +++ b/widget/testdata/select/desktop/layout_multiple_expanded_placeholder.xml @@ -0,0 +1,45 @@ + + + + + + + + (Pick 1) + + + + + + + + + + + + + + + + + + + + + + + + + + Foo + + + Bar + + + + + + + + diff --git a/widget/testdata/select/desktop/layout_multiple_expanded_selected.xml b/widget/testdata/select/desktop/layout_multiple_expanded_selected.xml new file mode 100644 index 0000000000..67449e1f10 --- /dev/null +++ b/widget/testdata/select/desktop/layout_multiple_expanded_selected.xml @@ -0,0 +1,45 @@ + + + + + + + + Foo + + + + + + + + + + + + + + + + + + + + + + + + + + Foo + + + Bar + + + + + + + + diff --git a/widget/testdata/select/desktop/layout_multiple_expanded_selected_placeholder.xml b/widget/testdata/select/desktop/layout_multiple_expanded_selected_placeholder.xml new file mode 100644 index 0000000000..d421573824 --- /dev/null +++ b/widget/testdata/select/desktop/layout_multiple_expanded_selected_placeholder.xml @@ -0,0 +1,45 @@ + + + + + + + + Foo + + + + + + + + + + + + + + + + + + + + + + + + + + Foo + + + Bar + + + + + + + + diff --git a/widget/testdata/select/layout_multiple_placeholder.xml b/widget/testdata/select/desktop/layout_multiple_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_multiple_placeholder.xml rename to widget/testdata/select/desktop/layout_multiple_placeholder.xml diff --git a/widget/testdata/select/layout_multiple_selected.xml b/widget/testdata/select/desktop/layout_multiple_selected.xml similarity index 100% rename from widget/testdata/select/layout_multiple_selected.xml rename to widget/testdata/select/desktop/layout_multiple_selected.xml diff --git a/widget/testdata/select/layout_multiple_selected_placeholder.xml b/widget/testdata/select/desktop/layout_multiple_selected_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_multiple_selected_placeholder.xml rename to widget/testdata/select/desktop/layout_multiple_selected_placeholder.xml diff --git a/widget/testdata/select/layout_single.xml b/widget/testdata/select/desktop/layout_single.xml similarity index 100% rename from widget/testdata/select/layout_single.xml rename to widget/testdata/select/desktop/layout_single.xml diff --git a/widget/testdata/select/desktop/layout_single_expanded.xml b/widget/testdata/select/desktop/layout_single_expanded.xml new file mode 100644 index 0000000000..7ecc175cec --- /dev/null +++ b/widget/testdata/select/desktop/layout_single_expanded.xml @@ -0,0 +1,42 @@ + + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + + Test + + + + + + + + diff --git a/widget/testdata/select/desktop/layout_single_expanded_placeholder.xml b/widget/testdata/select/desktop/layout_single_expanded_placeholder.xml new file mode 100644 index 0000000000..46ffc10d73 --- /dev/null +++ b/widget/testdata/select/desktop/layout_single_expanded_placeholder.xml @@ -0,0 +1,42 @@ + + + + + + + + (Pick 1) + + + + + + + + + + + + + + + + + + + + + + + + + + Test + + + + + + + + diff --git a/widget/testdata/select/desktop/layout_single_expanded_selected.xml b/widget/testdata/select/desktop/layout_single_expanded_selected.xml new file mode 100644 index 0000000000..525230be5e --- /dev/null +++ b/widget/testdata/select/desktop/layout_single_expanded_selected.xml @@ -0,0 +1,42 @@ + + + + + + + + Test + + + + + + + + + + + + + + + + + + + + + + + + + + Test + + + + + + + + diff --git a/widget/testdata/select/desktop/layout_single_expanded_selected_placeholder.xml b/widget/testdata/select/desktop/layout_single_expanded_selected_placeholder.xml new file mode 100644 index 0000000000..32e449c776 --- /dev/null +++ b/widget/testdata/select/desktop/layout_single_expanded_selected_placeholder.xml @@ -0,0 +1,42 @@ + + + + + + + + Test + + + + + + + + + + + + + + + + + + + + + + + + + + Test + + + + + + + + diff --git a/widget/testdata/select/layout_single_placeholder.xml b/widget/testdata/select/desktop/layout_single_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_single_placeholder.xml rename to widget/testdata/select/desktop/layout_single_placeholder.xml diff --git a/widget/testdata/select/layout_single_selected.xml b/widget/testdata/select/desktop/layout_single_selected.xml similarity index 100% rename from widget/testdata/select/layout_single_selected.xml rename to widget/testdata/select/desktop/layout_single_selected.xml diff --git a/widget/testdata/select/layout_single_selected_placeholder.xml b/widget/testdata/select/desktop/layout_single_selected_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_single_selected_placeholder.xml rename to widget/testdata/select/desktop/layout_single_selected_placeholder.xml diff --git a/widget/testdata/select/desktop/move_moved.xml b/widget/testdata/select/desktop/move_moved.xml new file mode 100644 index 0000000000..89c77578db --- /dev/null +++ b/widget/testdata/select/desktop/move_moved.xml @@ -0,0 +1,43 @@ + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 2 + + + + + + + + diff --git a/widget/testdata/select/desktop/move_tapped.xml b/widget/testdata/select/desktop/move_tapped.xml new file mode 100644 index 0000000000..a77a5ccdce --- /dev/null +++ b/widget/testdata/select/desktop/move_tapped.xml @@ -0,0 +1,43 @@ + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 2 + + + + + + + + diff --git a/widget/testdata/select/desktop/tap_animation.png b/widget/testdata/select/desktop/tap_animation.png new file mode 100644 index 0000000000..18dfb851b4 Binary files /dev/null and b/widget/testdata/select/desktop/tap_animation.png differ diff --git a/widget/testdata/select/desktop/tapped.xml b/widget/testdata/select/desktop/tapped.xml new file mode 100644 index 0000000000..dd334b3cf0 --- /dev/null +++ b/widget/testdata/select/desktop/tapped.xml @@ -0,0 +1,43 @@ + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 2 + + + + + + + + diff --git a/widget/testdata/select/desktop/tapped_constrained.xml b/widget/testdata/select/desktop/tapped_constrained.xml new file mode 100644 index 0000000000..8e268ea568 --- /dev/null +++ b/widget/testdata/select/desktop/tapped_constrained.xml @@ -0,0 +1,43 @@ + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 2 + + + + + + + + diff --git a/widget/testdata/select/desktop/theme_changed.png b/widget/testdata/select/desktop/theme_changed.png new file mode 100644 index 0000000000..7855eeee53 Binary files /dev/null and b/widget/testdata/select/desktop/theme_changed.png differ diff --git a/widget/testdata/select/desktop/theme_initial.png b/widget/testdata/select/desktop/theme_initial.png new file mode 100644 index 0000000000..0bb77ffdd2 Binary files /dev/null and b/widget/testdata/select/desktop/theme_initial.png differ diff --git a/widget/testdata/select/desktop/trailing.xml b/widget/testdata/select/desktop/trailing.xml new file mode 100644 index 0000000000..af8d9552c8 --- /dev/null +++ b/widget/testdata/select/desktop/trailing.xml @@ -0,0 +1,42 @@ + + + + + + + + (Select one) + + + + + + + + + + + + + + + + + + + + + + + + + + Hi + + + + + + + + diff --git a/widget/testdata/select/center.xml b/widget/testdata/select/mobile/center.xml similarity index 100% rename from widget/testdata/select/center.xml rename to widget/testdata/select/mobile/center.xml diff --git a/widget/testdata/select/mobile/layout_empty.xml b/widget/testdata/select/mobile/layout_empty.xml new file mode 100644 index 0000000000..a662d36d6a --- /dev/null +++ b/widget/testdata/select/mobile/layout_empty.xml @@ -0,0 +1,16 @@ + + + + + + + + (Select one) + + + + + + + + diff --git a/widget/testdata/select/layout_empty_expanded.xml b/widget/testdata/select/mobile/layout_empty_expanded.xml similarity index 100% rename from widget/testdata/select/layout_empty_expanded.xml rename to widget/testdata/select/mobile/layout_empty_expanded.xml diff --git a/widget/testdata/select/layout_empty_expanded_placeholder.xml b/widget/testdata/select/mobile/layout_empty_expanded_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_empty_expanded_placeholder.xml rename to widget/testdata/select/mobile/layout_empty_expanded_placeholder.xml diff --git a/widget/testdata/select/mobile/layout_empty_placeholder.xml b/widget/testdata/select/mobile/layout_empty_placeholder.xml new file mode 100644 index 0000000000..b6fb6c7b9c --- /dev/null +++ b/widget/testdata/select/mobile/layout_empty_placeholder.xml @@ -0,0 +1,16 @@ + + + + + + + + (Pick 1) + + + + + + + + diff --git a/widget/testdata/select/mobile/layout_multiple.xml b/widget/testdata/select/mobile/layout_multiple.xml new file mode 100644 index 0000000000..a662d36d6a --- /dev/null +++ b/widget/testdata/select/mobile/layout_multiple.xml @@ -0,0 +1,16 @@ + + + + + + + + (Select one) + + + + + + + + diff --git a/widget/testdata/select/layout_multiple_expanded.xml b/widget/testdata/select/mobile/layout_multiple_expanded.xml similarity index 100% rename from widget/testdata/select/layout_multiple_expanded.xml rename to widget/testdata/select/mobile/layout_multiple_expanded.xml diff --git a/widget/testdata/select/layout_multiple_expanded_placeholder.xml b/widget/testdata/select/mobile/layout_multiple_expanded_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_multiple_expanded_placeholder.xml rename to widget/testdata/select/mobile/layout_multiple_expanded_placeholder.xml diff --git a/widget/testdata/select/layout_multiple_expanded_selected.xml b/widget/testdata/select/mobile/layout_multiple_expanded_selected.xml similarity index 100% rename from widget/testdata/select/layout_multiple_expanded_selected.xml rename to widget/testdata/select/mobile/layout_multiple_expanded_selected.xml diff --git a/widget/testdata/select/layout_multiple_expanded_selected_placeholder.xml b/widget/testdata/select/mobile/layout_multiple_expanded_selected_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_multiple_expanded_selected_placeholder.xml rename to widget/testdata/select/mobile/layout_multiple_expanded_selected_placeholder.xml diff --git a/widget/testdata/select/mobile/layout_multiple_placeholder.xml b/widget/testdata/select/mobile/layout_multiple_placeholder.xml new file mode 100644 index 0000000000..b6fb6c7b9c --- /dev/null +++ b/widget/testdata/select/mobile/layout_multiple_placeholder.xml @@ -0,0 +1,16 @@ + + + + + + + + (Pick 1) + + + + + + + + diff --git a/widget/testdata/select/mobile/layout_multiple_selected.xml b/widget/testdata/select/mobile/layout_multiple_selected.xml new file mode 100644 index 0000000000..28338edfca --- /dev/null +++ b/widget/testdata/select/mobile/layout_multiple_selected.xml @@ -0,0 +1,16 @@ + + + + + + + + Foo + + + + + + + + diff --git a/widget/testdata/select/mobile/layout_multiple_selected_placeholder.xml b/widget/testdata/select/mobile/layout_multiple_selected_placeholder.xml new file mode 100644 index 0000000000..ee8fe4e34e --- /dev/null +++ b/widget/testdata/select/mobile/layout_multiple_selected_placeholder.xml @@ -0,0 +1,16 @@ + + + + + + + + Foo + + + + + + + + diff --git a/widget/testdata/select/mobile/layout_single.xml b/widget/testdata/select/mobile/layout_single.xml new file mode 100644 index 0000000000..a662d36d6a --- /dev/null +++ b/widget/testdata/select/mobile/layout_single.xml @@ -0,0 +1,16 @@ + + + + + + + + (Select one) + + + + + + + + diff --git a/widget/testdata/select/layout_single_expanded.xml b/widget/testdata/select/mobile/layout_single_expanded.xml similarity index 100% rename from widget/testdata/select/layout_single_expanded.xml rename to widget/testdata/select/mobile/layout_single_expanded.xml diff --git a/widget/testdata/select/layout_single_expanded_placeholder.xml b/widget/testdata/select/mobile/layout_single_expanded_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_single_expanded_placeholder.xml rename to widget/testdata/select/mobile/layout_single_expanded_placeholder.xml diff --git a/widget/testdata/select/layout_single_expanded_selected.xml b/widget/testdata/select/mobile/layout_single_expanded_selected.xml similarity index 100% rename from widget/testdata/select/layout_single_expanded_selected.xml rename to widget/testdata/select/mobile/layout_single_expanded_selected.xml diff --git a/widget/testdata/select/layout_single_expanded_selected_placeholder.xml b/widget/testdata/select/mobile/layout_single_expanded_selected_placeholder.xml similarity index 100% rename from widget/testdata/select/layout_single_expanded_selected_placeholder.xml rename to widget/testdata/select/mobile/layout_single_expanded_selected_placeholder.xml diff --git a/widget/testdata/select/mobile/layout_single_placeholder.xml b/widget/testdata/select/mobile/layout_single_placeholder.xml new file mode 100644 index 0000000000..b6fb6c7b9c --- /dev/null +++ b/widget/testdata/select/mobile/layout_single_placeholder.xml @@ -0,0 +1,16 @@ + + + + + + + + (Pick 1) + + + + + + + + diff --git a/widget/testdata/select/mobile/layout_single_selected.xml b/widget/testdata/select/mobile/layout_single_selected.xml new file mode 100644 index 0000000000..3a5759a084 --- /dev/null +++ b/widget/testdata/select/mobile/layout_single_selected.xml @@ -0,0 +1,16 @@ + + + + + + + + Test + + + + + + + + diff --git a/widget/testdata/select/mobile/layout_single_selected_placeholder.xml b/widget/testdata/select/mobile/layout_single_selected_placeholder.xml new file mode 100644 index 0000000000..df72a2755d --- /dev/null +++ b/widget/testdata/select/mobile/layout_single_selected_placeholder.xml @@ -0,0 +1,16 @@ + + + + + + + + Test + + + + + + + + diff --git a/widget/testdata/select/move_moved.xml b/widget/testdata/select/mobile/move_moved.xml similarity index 100% rename from widget/testdata/select/move_moved.xml rename to widget/testdata/select/mobile/move_moved.xml diff --git a/widget/testdata/select/move_tapped.xml b/widget/testdata/select/mobile/move_tapped.xml similarity index 100% rename from widget/testdata/select/move_tapped.xml rename to widget/testdata/select/mobile/move_tapped.xml diff --git a/widget/testdata/select/tap_animation.png b/widget/testdata/select/mobile/tap_animation.png similarity index 100% rename from widget/testdata/select/tap_animation.png rename to widget/testdata/select/mobile/tap_animation.png diff --git a/widget/testdata/select/tapped.xml b/widget/testdata/select/mobile/tapped.xml similarity index 100% rename from widget/testdata/select/tapped.xml rename to widget/testdata/select/mobile/tapped.xml diff --git a/widget/testdata/select/tapped_constrained.xml b/widget/testdata/select/mobile/tapped_constrained.xml similarity index 100% rename from widget/testdata/select/tapped_constrained.xml rename to widget/testdata/select/mobile/tapped_constrained.xml diff --git a/widget/testdata/select/theme_changed.png b/widget/testdata/select/mobile/theme_changed.png similarity index 100% rename from widget/testdata/select/theme_changed.png rename to widget/testdata/select/mobile/theme_changed.png diff --git a/widget/testdata/select/theme_initial.png b/widget/testdata/select/mobile/theme_initial.png similarity index 100% rename from widget/testdata/select/theme_initial.png rename to widget/testdata/select/mobile/theme_initial.png diff --git a/widget/testdata/select/trailing.xml b/widget/testdata/select/mobile/trailing.xml similarity index 100% rename from widget/testdata/select/trailing.xml rename to widget/testdata/select/mobile/trailing.xml