xamarin/Xamarin.Forms

[Android] SearchBar doesn't show inside a StackLayout on API24

Ouverte

#5 328 ouverte le 20 févr. 2019

 (1 commentaire) (0 réaction) (0 personne assignée)C# (1 926 forks)batch import
e/2 :clock2:good first issuehelp wantedinactivep/Androidt/bug :bug:up-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Description

When using a SearchBar inside a StackLayout on Android API24 for some particular reason the native widget doesn't size correctly

Steps to Reproduce

  1. Run Control gallery on API24 try type on the Initial SearchBar. or use the sample code on API24:
var page = new ContentPage { Padding = new Thickness(10), BackgroundColor = Color.Red };
var searchBar = new SearchBar { BackgroundColor = Color.Yellow, Text = "Search" , Margin = new Thickness(20) };
page.Content = new StackLayout { Children = { searchBar }, BackgroundColor = Color.Blue };

Expected Behavior

Render SearchBar inside of the StackLayout on all Android API's

Actual Behavior

SearchBar doesn't show

Basic Information

  • Version with issue: 3.5.0
  • Last known good version: ? I think none , we never had api24 tests passing
  • Platform Target Frameworks:
    • Android: API24

Screenshots

API24 screenshot_1550687566

API27 screenshot_1550693355

Reproduction Link

Control gallery or sample code above

Guide contributeur