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

Commit

Permalink
simplify Android styles
Browse files Browse the repository at this point in the history
  • Loading branch information
edgiardina committed May 12, 2022
1 parent 10e7b2e commit 9f21f72
Show file tree
Hide file tree
Showing 12 changed files with 4,562 additions and 3,576 deletions.
4 changes: 1 addition & 3 deletions Ifpa/Ifpa.Android/Ifpa.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@
<ItemGroup>
<Compile Include="Renderers\HomeTabbedPageRenderer.cs" />
<Compile Include="Renderers\TintImageEffect.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Services\AndroidReminderService.cs" />
<Compile Include="BackgroundReceiver.cs" />
<Compile Include="BadgeDrawable.cs" />
<Compile Include="MainActivity.cs" />
<Compile Include="Services\AndroidNotificationService.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\ToolbarItemBadgeService.cs" />
<Compile Include="SplashActivity.cs" />
Expand All @@ -98,8 +98,6 @@
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\calendar_add.png" />
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\mipmap-hdpi\Icon.png">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
Expand Down
2 changes: 0 additions & 2 deletions Ifpa/Ifpa.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompa
{
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
Expand Down
7,775 changes: 4,271 additions & 3,504 deletions Ifpa/Ifpa.Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions Ifpa/Ifpa.Android/Resources/layout/Tabbar.axml

This file was deleted.

9 changes: 0 additions & 9 deletions Ifpa/Ifpa.Android/Resources/layout/Toolbar.axml

This file was deleted.

35 changes: 1 addition & 34 deletions Ifpa/Ifpa.Android/Resources/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,5 @@
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowActionBar">true</item>
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.DayNight.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#2196F3</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#1976D2</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#4579FB</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>

<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>

<style name="AppCompatDialogStyle" parent="Theme.AppCompat.DayNight.Dialog">
<item name="colorAccent">#4579FB</item>
</style>


<style name="MainTheme.DarkTheme.Base" parent="Theme.AppCompat">
<!-- Your app's theme defined here -->
</style>
<style name="MainTheme.DarkTheme.Toolbar" parent="MainTheme.DarkTheme.Base">
<item name="android:drawableTint">@color/iconAccentColor</item>
<item name="colorControlNormal">@color/primaryTextColor</item>
</style>
</style>
</resources>
2 changes: 1 addition & 1 deletion Ifpa/Ifpa/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:Ifpa.Views"
x:Class="Ifpa.AppShell">
x:Class="Ifpa.AppShell" BackgroundColor="{DynamicResource BackgroundColor}">
<TabBar>
<ShellContent Title="Rankings" ContentTemplate="{DataTemplate views:RankingsPage}" Icon="numbered_list.png" Route="rankings" />
<ShellContent Title="Champ. Series" ContentTemplate="{DataTemplate views:ChampionshipSeriesListPage}" Icon="trophy.png" Route="champ-series-list" />
Expand Down
9 changes: 9 additions & 0 deletions Ifpa/Ifpa/Ifpa.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
</ItemGroup>

<ItemGroup>
<Compile Update="Strings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
<Compile Update="Styles\DefaultTheme.xaml.cs">
<DependentUpon>DefaultTheme.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -101,6 +106,10 @@
<EmbeddedResource Update="AppShell.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Styles\DarkTheme.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
Expand Down
108 changes: 108 additions & 0 deletions Ifpa/Ifpa/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

135 changes: 135 additions & 0 deletions Ifpa/Ifpa/Strings.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>IFPA Companion</value>
</data>
<data name="RankChannelDescription" xml:space="preserve">
<value>Notifications when your IFPA Profile's rank changes</value>
</data>
<data name="RankChannelName" xml:space="preserve">
<value>WPPR Rank Change Notifications</value>
</data>
<data name="TournamentChannelDescription" xml:space="preserve">
<value>Notifications when your IFPA Profile is listed in a new Tournament Result submission</value>
</data>
<data name="TournamentChannelName" xml:space="preserve">
<value>Tournament Results Notifications</value>
</data>
</root>
Loading

0 comments on commit 9f21f72

Please sign in to comment.