Я использую FloatingActionButton на странице с листингом моего приложения, я также хочу добавить searchBar. Но я не мог показать им эту страницу. Мои коды и скриншот отсутствуют. Как я могу показать searchBar?Xamarin Forms RelativeLayout Использование
FAB Github
Мои коды:
<ContentPage.Content>
<RelativeLayout>
<SearchBar
x:Name="searchBar"
Placeholder="Ara"
/>
<ContentView
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}">
<ListView
x:Name="list"
BackgroundColor="White">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell
Text="{Binding .}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentView>
<fab:FloatingActionButton
x:Name="fabBtn"
Source="plus.png"
Size="Normal"
Clicked="Handle_FabClicked"
NormalColor="Green"
RippleColor="Red"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1, Constant=-75}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1, Constant=-75}" />
</RelativeLayout>
</ContentPage.Content>
</ContentPage>
плавающая кнопка действия на iOS? Вы уверены, что дизайн хорошо подходит для iOS? – Cheesebaron
Да, он отлично работает. – ozmert75
В любом случае, глядя на ваш код, ContentView перекрывает ваш SearchBar, поэтому вы его не видите. – Cheesebaron