<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:code="clr-namespace:SpecialForcesDirectory.Code;assembly=SpecialForcesDirectory"
xmlns:controls="clr-namespace:SpecialForcesDirectory.Controls;assembly=SpecialForcesDirectory"
xmlns:views="clr-namespace:SpecialForcesDirectory.Views;assembly=SpecialForcesDirectory"
Title="{Binding Title}"
NavigationPage.HasNavigationBar="false"
x:Class="SpecialForcesDirectory.Views.PodcatPage"
Visual="Material">
<Shell.BackButtonBehavior>
<BackButtonBehavior Command="{Binding GoBackCommand}" />
</Shell.BackButtonBehavior>
<ContentPage.Resources>
<ResourceDictionary>
<Thickness x:Key="ListMargin" Bottom="0" Top="0" Right="0" Left="0" />
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem
x:Name="TbiCategory"
Clicked="TbiCategory_OnClicked" />
<ToolbarItem
Text="{Binding SettingToolbarItem}"
Order="Secondary" Priority="2"
Clicked="OnSettingsClicked" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<AbsoluteLayout Padding="0" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Grid RowSpacing="0" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackLayout Grid.Row="0"
BackgroundColor="White">
<StackLayout>
<ListView x:Name="ItemsListView"
Margin="{StaticResource ListMargin}"
ItemsSource="{Binding Items}"
VerticalOptions="FillAndExpand"
HasUnevenRows="true"
RefreshCommand="{Binding LoadItemsCommand}"
IsPullToRefreshEnabled="true"
IsRefreshing="{Binding IsBusy, Mode=OneWay}"
CachingStrategy="RecycleElement"
ItemSelected="OnItemSelected">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" Padding="10"
BackgroundColor="{Binding BackgroundColor}"
HorizontalOptions="FillAndExpand">
<Image
IsVisible="{Binding IsOnline}"
WidthRequest="80"
HeightRequest="80"
VerticalOptions="Start">
<Image.Source>
<UriImageSource Uri="{Binding ImageUrl}"
CacheValidity="3"
CachingEnabled="true" />
</Image.Source>
</Image>
<Image
IsVisible="{Binding IsOffline}"
WidthRequest="80"
HeightRequest="80"
VerticalOptions="Start">
<Image.Source>
<FileImageSource File="{Binding ImageFile}" />
</Image.Source>
</Image>
<StackLayout VerticalOptions="FillAndExpand">
<Label Text="{Binding Title}"
LineBreakMode="NoWrap"
HorizontalOptions="FillAndExpand"
Style="{DynamicResource ListItemTextStyle}"
FontSize="16" />
<Label Text="{Binding Description}"
LineBreakMode="WordWrap"
HorizontalOptions="FillAndExpand"
Style="{DynamicResource ListItemDetailTextStyle}"
FontSize="14" />
</StackLayout>
<code:FontAwesomeIcon
FontSize="Large"
HorizontalOptions="EndAndExpand"
VerticalOptions="Start"
IsVisible="{Binding RunOnAndroid}"
Text="{x:Static code:FaIcon.AngleRight}" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</StackLayout>
<controls:AdControlView Grid.Row="1"
HeightRequest="50"
AdUnitId="{Binding AdId}" />
<StackLayout Grid.Row="2">
<Button
TextColor="{StaticResource NavigationPrimary}"
BackgroundColor="{StaticResource MainBackgroundColor}"
Text="{Binding PodcatBackButtonLabel}"
CornerRadius="0"
Margin="0"
Padding="0"
Clicked="GoHomeButtonOnClicked" />
</StackLayout>
</Grid>
<!--Popup Area-->
<views:GlobalCategoryView x:Name="popupLoginView" BackgroundColor="#C0808080" Padding="100, 0, 0, 0"
IsVisible="false" AbsoluteLayout.LayoutBounds="0.4, 0, 1, 1"
AbsoluteLayout.LayoutFlags="All" />
</AbsoluteLayout>
</ContentPage.Content>
</ContentPage>