mirror of
https://github.com/bitwarden/android.git
synced 2025-01-11 18:57:39 +03:00
search bar for ios
This commit is contained in:
parent
38f91bce1c
commit
d81585ccc3
5 changed files with 58 additions and 43 deletions
|
@ -20,17 +20,14 @@
|
|||
<u:DateTimeConverter x:Key="dateTime" />
|
||||
<ToolbarItem Text="{u:I18n Close}" Clicked="Close_Clicked" Order="Primary" Priority="-1"
|
||||
x:Name="_closeItem" x:Key="closeItem" />
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<NavigationPage.TitleView>
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
Spacing="0"
|
||||
Padding="0"
|
||||
x:Name="_titleLayout">
|
||||
x:Name="_titleLayout"
|
||||
x:Key="titleLayout">
|
||||
<controls:MiButton
|
||||
StyleClass="btn-title, btn-title-platform"
|
||||
Text=""
|
||||
|
@ -40,14 +37,16 @@
|
|||
<SearchBar
|
||||
x:Name="_searchBar"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
BackgroundColor="Transparent"
|
||||
TextChanged="SearchBar_TextChanged"
|
||||
SearchButtonPressed="SearchBar_SearchButtonPressed"
|
||||
Placeholder="{Binding PageTitle}" />
|
||||
</StackLayout>
|
||||
</NavigationPage.TitleView>
|
||||
<BoxView StyleClass="list-section-separator-bottom, list-section-separator-bottom-platform"
|
||||
x:Name="_separator" x:Key="separator" />
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<StackLayout x:Name="_mainLayout">
|
||||
<StackLayout x:Name="_mainLayout" Spacing="0" Padding="0">
|
||||
<controls:FaLabel IsVisible="{Binding ShowSearchDirection}"
|
||||
Text=""
|
||||
StyleClass="text-muted"
|
||||
|
|
|
@ -43,7 +43,13 @@ namespace Bit.App.Pages
|
|||
if(Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
ToolbarItems.Add(_closeItem);
|
||||
_titleLayout.Children.Remove(_backButton);
|
||||
_searchBar.Placeholder = AppResources.Search;
|
||||
_mainLayout.Children.Insert(0, _searchBar);
|
||||
_mainLayout.Children.Insert(1, _separator);
|
||||
}
|
||||
else
|
||||
{
|
||||
NavigationPage.SetTitleView(this, _titleLayout);
|
||||
}
|
||||
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
|
||||
}
|
||||
|
|
|
@ -21,6 +21,16 @@
|
|||
<Setter Property="Margin"
|
||||
Value="-4, 0, -4, -4" />
|
||||
</Style>
|
||||
<Style TargetType="SearchBar">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="Transparent" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{StaticResource TitleEntryTextColor}" />
|
||||
<Setter Property="CancelButtonColor"
|
||||
Value="{StaticResource TitleEntryTextColor}" />
|
||||
<Setter Property="PlaceholderColor"
|
||||
Value="{StaticResource TitleEntryPlaceholderColor}" />
|
||||
</Style>
|
||||
|
||||
<!-- Buttons -->
|
||||
|
||||
|
|
|
@ -124,16 +124,6 @@
|
|||
<Setter Property="TextColor"
|
||||
Value="{StaticResource TitleTextColor}" />
|
||||
</Style>
|
||||
<Style TargetType="SearchBar">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="Transparent" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{StaticResource TitleEntryTextColor}" />
|
||||
<Setter Property="CancelButtonColor"
|
||||
Value="{StaticResource TitleEntryTextColor}" />
|
||||
<Setter Property="PlaceholderColor"
|
||||
Value="{StaticResource TitleEntryPlaceholderColor}" />
|
||||
</Style>
|
||||
|
||||
<!-- List -->
|
||||
<Style TargetType="ListView"
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
<Setter Property="OnColor"
|
||||
Value="{StaticResource SwitchOnColor}" />
|
||||
</Style>
|
||||
<Style TargetType="SearchBar">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{StaticResource ListHeaderBackgroundColor}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{StaticResource TextColor}" />
|
||||
<Setter Property="CancelButtonColor"
|
||||
Value="{StaticResource PrimaryColor}" />
|
||||
<Setter Property="PlaceholderColor"
|
||||
Value="{StaticResource MutedColor}" />
|
||||
</Style>
|
||||
|
||||
<!-- Buttons -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue