mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
search icon
This commit is contained in:
parent
c3b9f4e5a8
commit
21bbb2af42
3 changed files with 20 additions and 4 deletions
|
@ -44,12 +44,19 @@
|
||||||
</NavigationPage.TitleView>
|
</NavigationPage.TitleView>
|
||||||
|
|
||||||
<StackLayout x:Name="_mainLayout">
|
<StackLayout x:Name="_mainLayout">
|
||||||
|
<controls:FaLabel IsVisible="{Binding ShowSearchDirection}"
|
||||||
|
Text=""
|
||||||
|
StyleClass="text-muted"
|
||||||
|
FontSize="50"
|
||||||
|
VerticalOptions="CenterAndExpand"
|
||||||
|
HorizontalOptions="CenterAndExpand"
|
||||||
|
HorizontalTextAlignment="Center" />
|
||||||
<Label IsVisible="{Binding ShowNoData}"
|
<Label IsVisible="{Binding ShowNoData}"
|
||||||
Text="{u:I18n NoItemsToList}"
|
Text="{u:I18n NoItemsToList}"
|
||||||
Margin="20, 0"
|
Margin="20, 0"
|
||||||
VerticalOptions="CenterAndExpand"
|
VerticalOptions="CenterAndExpand"
|
||||||
HorizontalOptions="CenterAndExpand"
|
HorizontalOptions="CenterAndExpand"
|
||||||
HorizontalTextAlignment="Center"></Label>
|
HorizontalTextAlignment="Center" />
|
||||||
<ListView x:Name="_listView"
|
<ListView x:Name="_listView"
|
||||||
IsVisible="{Binding ShowList}"
|
IsVisible="{Binding ShowList}"
|
||||||
ItemsSource="{Binding Ciphers}"
|
ItemsSource="{Binding Ciphers}"
|
||||||
|
|
|
@ -51,15 +51,23 @@ namespace Bit.App.Pages
|
||||||
public bool ShowNoData
|
public bool ShowNoData
|
||||||
{
|
{
|
||||||
get => _showNoData;
|
get => _showNoData;
|
||||||
set => SetProperty(ref _showNoData, value);
|
set => SetProperty(ref _showNoData, value, additionalPropertyNames: new string[]
|
||||||
|
{
|
||||||
|
nameof(ShowSearchDirection)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ShowList
|
public bool ShowList
|
||||||
{
|
{
|
||||||
get => _showList;
|
get => _showList;
|
||||||
set => SetProperty(ref _showList, value);
|
set => SetProperty(ref _showList, value, additionalPropertyNames: new string[]
|
||||||
|
{
|
||||||
|
nameof(ShowSearchDirection)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool ShowSearchDirection => !ShowList && !ShowNoData;
|
||||||
|
|
||||||
public void Search(string searchText, int? timeout = null)
|
public void Search(string searchText, int? timeout = null)
|
||||||
{
|
{
|
||||||
var previousCts = _searchCancellationTokenSource;
|
var previousCts = _searchCancellationTokenSource;
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
Value="{StaticResource TextColor}" />
|
Value="{StaticResource TextColor}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="Label"
|
<Style TargetType="Label"
|
||||||
Class="text-muted">
|
Class="text-muted"
|
||||||
|
ApplyToDerivedTypes="True">
|
||||||
<Setter Property="TextColor"
|
<Setter Property="TextColor"
|
||||||
Value="{StaticResource MutedColor}" />
|
Value="{StaticResource MutedColor}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
Loading…
Reference in a new issue