Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Carousel, Shell Navigation, Custom Fonts #173

Open
wants to merge 7 commits into
base: vnext
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/Android/Hanselman.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
<AndroidResource Include="Resources\drawable\hm_full.jpg" />
<AndroidResource Include="Resources\drawable\scott159.png" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidAsset Include="Assets\materialdesignicons-webfont.ttf" />
<AndroidResource Include="Resources\drawable-hdpi\ic_about.png" />
<AndroidResource Include="Resources\drawable-hdpi\ic_podcast.png" />
<AndroidResource Include="Resources\drawable-hdpi\ic_rss.png" />
Expand Down Expand Up @@ -151,16 +150,16 @@
<Version>2.7.9</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter">
<Version>3.0.0</Version>
<Version>3.2.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Analytics">
<Version>3.0.0</Version>
<Version>3.2.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Crashes">
<Version>3.0.0</Version>
<Version>3.2.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Distribute">
<Version>3.0.0</Version>
<Version>3.2.1</Version>
</PackageReference>
<PackageReference Include="MonkeyCache.FileStore">
<Version>1.4.0-beta</Version>
Expand All @@ -172,21 +171,24 @@
<Version>1.6.1-beta</Version>
</PackageReference>
<PackageReference Include="Shiny.Core">
<Version>1.1.0.1449</Version>
<Version>1.1.0.1570</Version>
</PackageReference>
<PackageReference Include="System.Json">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.5.1</Version>
<Version>1.5.3.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.1.0" />
<PackageReference Include="Xamarin.Forms.PancakeView" Version="1.3.7" />
<PackageReference Include="Xamarin.Forms" Version="4.6.0.379-pre1" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="4.6.0.379-pre1" />
<PackageReference Include="Xamarin.Forms.PancakeView" Version="1.4.2" />
<PackageReference Include="Xamarin.Forms" Version="4.6.0.726" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="4.6.0.726" />
<PackageReference Include="Xamarin.Google.Android.Material">
<Version>1.1.0-rc2</Version>
</PackageReference>
<PackageReference Include="Sharpnado.MaterialFrame">
<Version>1.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\ic_twitter.png" />
Expand Down
1,075 changes: 542 additions & 533 deletions src/Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Hanselman.Shared.Models/Hanselman.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Refractored.MvvmHelpers" Version="1.6.1-beta" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="System.Text.Json" Version="4.7.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.1" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions src/Hanselman.Shared.Models/Models/Podcast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using MvvmHelpers;
using Newtonsoft.Json;

namespace Hanselman.Models
{
Expand Down Expand Up @@ -36,5 +37,10 @@ public string HostsNames
public string TwitterUrl { get; set; }

public List<PodcastService> PodcastServices { get; set; }

[JsonIgnore]
public string UriRoute =>
$"{nameof(Id)}={Uri.EscapeDataString(Id)}&{nameof(Title)}={Uri.EscapeDataString(Title)}";

}
}
3 changes: 3 additions & 0 deletions src/Hanselman.Shared.Models/Models/VideoFeedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ public string DisplayDate
get => DateTimeOffset.TryParse(Date, out var time) ? time.PodcastEpisodeHumanize() : Date;
set => displayDate = value;
}

public string UriRoute(string seriesId) =>
$"{nameof(Id)}={Uri.EscapeDataString(Id)}&SeriesId={Uri.EscapeDataString(seriesId)}";
}
}
126 changes: 74 additions & 52 deletions src/Hanselman/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
x:Class="Hanselman.App"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:sharpnado="clr-namespace:Sharpnado.MaterialFrame;assembly=Sharpnado.MaterialFrame"
xmlns:styles="clr-namespace:Hanselman.Styles">
<Application.Resources>
<ResourceDictionary>

<!--Colors-->
<!-- Colors -->
<Color x:Key="PrimaryColor">#007AFF</Color>
<Color x:Key="AccentColor">#5AC8FA</Color>
<Color x:Key="WindowBackgroundColor">#F5F5F5</Color>
Expand Down Expand Up @@ -35,22 +36,22 @@

<Color x:Key="SeparatorColor">#757575</Color>
<Color x:Key="OpaqueSeparatorColor">#757575</Color>
<!--Shell-->


<!-- Shell -->
<Color x:Key="ShellTabBarBackgroundColor">#F5F5F5</Color>

<!--Frame-->
<!-- Frame -->
<Color x:Key="FrameBackgroundColor">#FFFFFF</Color>
<Color x:Key="FrameBorderColor">Default</Color>
<!--Entry-->

<!-- Entry -->
<Color x:Key="EntryBackgroundColor">#FFFFFF</Color>

<!--RefreshView-->
<!-- RefreshView -->
<Color x:Key="RefreshViewBackgroundColor">White</Color>

<!--Icons-->
<!-- Icons -->
<x:String x:Key="IconPlayCircleOutline">&#xf05a;</x:String>
<x:String x:Key="IconPlay">&#xf40a;</x:String>
<x:String x:Key="IconPause">&#xf3e4;</x:String>
Expand All @@ -62,88 +63,109 @@

<x:String x:Key="IconAbout">&#xf2fd;</x:String>
<x:String x:Key="IconTwitter">&#xf544;</x:String>
<x:String x:Key="IconTwitterBox">&#xf546;</x:String>
<x:String x:Key="IconInstagram">&#xf2fe;</x:String>
<x:String x:Key="IconFacebook">&#xf20d;</x:String>
<x:String x:Key="IconMedia">&#xf40b;</x:String>
<x:String x:Key="IconSettings">&#xf8ba;</x:String>
<x:String x:Key="IconBlog">&#xf46b;</x:String> >
<x:String x:Key="IconBlog">&#xf46b;</x:String>
<x:String x:Key="IconClose">&#xf156;</x:String>
<x:String x:Key="IconChevUp">&#xf077;</x:String>
<x:String x:Key="IconChevDown">&#xf078;</x:String>

<x:String x:Key="MaterialFontFamily">MaterialDesignIcons</x:String>

<x:String x:Key="MaterialFontFamilyIcon">MaterialDesignIcons</x:String>


<Color x:Key="AcrylicSurface">#E6E6E6</Color>
<Color x:Key="AcrylicFrameBackgroundColor">#F1F1F1</Color>

<x:Int32 x:Key="CloseButtonBorderWidth">0</x:Int32>

<x:Int32 x:Key="BlogSpan">1</x:Int32>
<x:Int32 x:Key="VideoSpan">1</x:Int32>

<FontImageSource
x:Key="PlayIcon"
FontFamily="{DynamicResource MaterialFontFamily}"
FontFamily="{DynamicResource MaterialFontFamilyIcon}"
Glyph="{StaticResource IconPlay}"
Size="15"
Color="{StaticResource PrimaryColor}"/>
Color="{StaticResource PrimaryColor}" />

<FontImageSource
x:Key="PauseIcon"
FontFamily="{DynamicResource MaterialFontFamily}"
FontFamily="{DynamicResource MaterialFontFamilyIcon}"
Glyph="{StaticResource IconPause}"
Size="15"
Color="{StaticResource PrimaryColor}"/>
Color="{StaticResource PrimaryColor}" />

<FontImageSource
x:Key="CloseIcon"
FontFamily="{DynamicResource MaterialFontFamily}"
FontFamily="{DynamicResource MaterialFontFamilyIcon}"
Glyph="{StaticResource IconClose}"
Size="15"
Color="{StaticResource PrimaryColor}"/>
Color="{StaticResource PrimaryColor}" />


<!-- Control Themeing -->

<!--Control Themeing-->
<Style x:Key="MaterialFrameStyle" TargetType="sharpnado:MaterialFrame">
<Setter Property="MaterialTheme" Value="{DynamicResource DynamicMaterialFrameTheme}" />
<Setter Property="LightThemeBackgroundColor" Value="{StaticResource AcrylicFrameBackgroundColor}" />
<Setter Property="CornerRadius" Value="8" />
</Style>

<OnPlatform x:Key="MaterialFontFamily" x:TypeArguments="x:String">
<On Platform="iOS" Value="Material Design Icons" />
<On Platform="Android" Value="materialdesignicons-webfont.ttf#Material Design Icons" />
<On Platform="UWP" Value="Assets/Fonts/materialdesignicons-webfont.ttf#Material Design Icons" />
</OnPlatform>

<Style x:Key="RefreshViewStyle" TargetType="RefreshView">
<Setter Property="BackgroundColor" Value="{DynamicResource RefreshViewBackgroundColor}"/>
<Setter Property="RefreshColor" Value="{DynamicResource PrimaryColor}"/>
<Setter Property="BackgroundColor" Value="{DynamicResource RefreshViewBackgroundColor}" />
<Setter Property="RefreshColor" Value="{DynamicResource PrimaryColor}" />
</Style>

<Style x:Key="FrameStyle" TargetType="Frame">
<Setter Property="BackgroundColor" Value="{DynamicResource FrameBackgroundColor}"/>
<Setter Property="BorderColor" Value="{DynamicResource FrameBorderColor}"/>
<Setter Property="Visual" Value="Material"/>
<Setter Property="HasShadow" Value="True"/>
<Setter Property="BackgroundColor" Value="{DynamicResource FrameBackgroundColor}" />
<Setter Property="BorderColor" Value="{DynamicResource FrameBorderColor}" />
<Setter Property="Visual" Value="Material" />
<Setter Property="HasShadow" Value="True" />
</Style>

<Style x:Key="PickerStyle" TargetType="Picker">
<Setter Property="Visual" Value="Material"/>
<Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}"/>
<Setter Property="TextColor" Value="{DynamicResource PrimaryColor}"/>
<Setter Property="TitleColor" Value="{DynamicResource SystemGray}"/>
<Setter Property="Visual" Value="Material" />
<Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
<Setter Property="TextColor" Value="{DynamicResource PrimaryColor}" />
<Setter Property="TitleColor" Value="{DynamicResource SystemGray}" />
</Style>

<Style x:Key="BaseLabelStyle" TargetType="Label">
<Setter Property="TextColor" Value="{DynamicResource SystemGray}"/>
<Setter Property="TextColor" Value="{DynamicResource SystemGray}" />
</Style>

<Style x:Key="LargeLabelStyle" TargetType="Label"
BasedOn="{StaticResource BaseLabelStyle}">
<Setter Property="FontSize" Value="Large"/>
<Style
x:Key="LargeLabelStyle"
BasedOn="{StaticResource BaseLabelStyle}"
TargetType="Label">
<Setter Property="FontSize" Value="Large" />
</Style>

<Style x:Key="MediumLabelStyle" TargetType="Label"
BasedOn="{StaticResource BaseLabelStyle}" >
<Setter Property="FontSize" Value="Medium"/>
<Style
x:Key="MediumLabelStyle"
BasedOn="{StaticResource BaseLabelStyle}"
TargetType="Label">
<Setter Property="FontSize" Value="Medium" />
</Style>

<Style x:Key="SmallLabelStyle" TargetType="Label"
BasedOn="{StaticResource BaseLabelStyle}" >
<Setter Property="FontSize" Value="Small"/>
<Style
x:Key="SmallLabelStyle"
BasedOn="{StaticResource BaseLabelStyle}"
TargetType="Label">
<Setter Property="FontSize" Value="Small" />
</Style>

<Style x:Key="MicroLabelStyle" TargetType="Label"
BasedOn="{StaticResource BaseLabelStyle}" >
<Setter Property="FontSize" Value="Micro"/>
<Style
x:Key="MicroLabelStyle"
BasedOn="{StaticResource BaseLabelStyle}"
TargetType="Label">
<Setter Property="FontSize" Value="Micro" />
</Style>

<Style x:Key="DateTimeLabelStyle" TargetType="Label">
Expand All @@ -153,40 +175,40 @@
</Style>

<Style x:Key="MaterialNormalButton" TargetType="Button">
<Setter Property="FontFamily" Value="{StaticResource MaterialFontFamily}" />
<Setter Property="FontFamily" Value="{StaticResource MaterialFontFamilyIcon}" />
<Setter Property="TextColor" Value="{DynamicResource SystemGray}" />
<Setter Property="BorderColor" Value="Transparent" />
<Setter Property="BackgroundColor" Value="Transparent" />
</Style>

<Style x:Key="MaterialButton" TargetType="Button">
<Setter Property="FontFamily" Value="{StaticResource MaterialFontFamily}" />
<Setter Property="FontFamily" Value="{StaticResource MaterialFontFamilyIcon}" />
<Setter Property="FontSize" Value="40" />
<Setter Property="TextColor" Value="{DynamicResource SystemGray}" />
<Setter Property="WidthRequest" Value="65" />
<Setter Property="HeightRequest" Value="65" />
<Setter Property="VerticalOptions" Value="FillAndExpand" />
<Setter Property="HorizontalOptions" Value="FillAndExpand" />
<Setter Property="BorderColor" Value="Transparent" />
<Setter Property="Visual" Value="Default"/>
<Setter Property="Visual" Value="Default" />
<Setter Property="BackgroundColor" Value="Transparent" />
</Style>

<Style x:Key="CloseButtonStyle" TargetType="Button">
<Setter Property="BackgroundColor" Value="{DynamicResource FrameBackgroundColor}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="BorderColor" Value="{DynamicResource FrameBorderColor}"/>
<Setter Property="BorderWidth" Value="{DynamicResource CloseButtonBorderWidth}"/>
<Setter Property="BorderColor" Value="{DynamicResource FrameBorderColor}" />
<Setter Property="BorderWidth" Value="{DynamicResource CloseButtonBorderWidth}" />
<Setter Property="CornerRadius" Value="20" />
<Setter Property="HeightRequest" Value="40"/>
<Setter Property="HeightRequest" Value="40" />
<Setter Property="Visual" Value="Material" />
<Setter Property="TextColor" Value="{DynamicResource SystemBlue}" />
</Style>

<Style x:Key="SubscribeButtonStyle" TargetType="Button">
<Setter Property="BackgroundColor" Value="{DynamicResource PrimaryColor}" />
<Setter Property="CornerRadius" Value="20" />
<Setter Property="HeightRequest" Value="40"/>
<Setter Property="HeightRequest" Value="40" />
<Setter Property="Visual" Value="Material" />
<Setter Property="TextColor" Value="White" />
<Setter Property="Padding" Value="20,0" />
Expand Down
4 changes: 2 additions & 2 deletions src/Hanselman/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
// mjfreelancing cheered 250 October 18, 2019
// Instafluff raided with 60 people on March 6 2020

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace Hanselman
{
public partial class App : Application
Expand All @@ -35,7 +34,8 @@ public App()
"StateTriggers_Experimental",
"IndicatorView_Experimental",
"CarouselView_Experimental",
"MediaElement_Experimental"
"MediaElement_Experimental",
"Expander_Experimental"
});

InitializeComponent();
Expand Down
Loading