more theming

This commit is contained in:
Kyle Spearrin 2019-05-29 16:44:18 -04:00
parent a1741fdd67
commit 3fe7324cdf
24 changed files with 429 additions and 341 deletions

View file

@ -521,5 +521,50 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable\slider_thumb.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\splash_screen_dark.xml">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\logo_white.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\logo_white.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxhdpi\logo_white.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\search.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\search.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\search.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxhdpi\search.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxxhdpi\search.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\cog.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\cog.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\cog.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxhdpi\cog.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxxhdpi\cog.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@color/darkgray"/>
</item>
<item>
<bitmap android:src="@drawable/logo_white" android:tileMode="disabled" android:gravity="center"/>
</item>
</layer-list>

View file

@ -2,4 +2,6 @@
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<style name="DarkTheme" parent="DarkTheme.Base">
</style>
</resources>

View file

@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="launcher_background">#FFFFFF</color>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="darkgray">#333333</color>
<color name="gray">#738182</color>
<color name="lightgray">#efeff4</color>
<color name="colorPrimary">#3c8dbc</color>
<color name="colorPrimaryDark">#222d32</color>
<color name="colorAccent">#3883af</color>
@ -22,4 +15,11 @@
<color name="dark_darkaccent">#222d32</color>
<color name="dark_accent">#449BCE</color>
<color name="dark_border">#545454</color>
<color name="launcher_background">#FFFFFF</color>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="darkgray">#333333</color>
<color name="gray">#738182</color>
<color name="lightgray">#efeff4</color>
</resources>

View file

@ -4,6 +4,10 @@
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="DarkTheme.Splash" parent="DarkTheme.Base">
<item name="android:windowBackground">@drawable/splash_screen_dark</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="MainTheme" parent="MainTheme.Base">
</style>
@ -36,7 +40,6 @@
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
<item name="android:colorActivatedHighlight">@android:color/transparent</item>
<item name="android:textCursorDrawable">@null</item>
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">

View file

@ -5,6 +5,7 @@ using Android.OS;
using Android.Support.V7.App;
using System.Threading.Tasks;
using Android.Content;
using Bit.App.Utilities;
namespace Bit.Droid
{
@ -21,6 +22,7 @@ namespace Bit.Droid
{
public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
{
UpdateTheme(ThemeManager.GetTheme());
base.OnCreate(savedInstanceState, persistentState);
}
@ -35,5 +37,17 @@ namespace Bit.Droid
});
startupWork.Start();
}
private void UpdateTheme(string theme)
{
if(theme == "dark")
{
SetTheme(Resource.Style.DarkTheme_Splash);
}
else
{
SetTheme(Resource.Style.MainTheme_Splash);
}
}
}
}

View file

@ -15,7 +15,7 @@
</ContentPage.BindingContext>
<ContentPage.ToolbarItems>
<ToolbarItem Text="&#xf002;" Clicked="Search_Clicked" />
<ToolbarItem Icon="search.png" Clicked="Search_Clicked" />
</ContentPage.ToolbarItems>
<ContentPage.Resources>

View file

@ -15,7 +15,7 @@
</ContentPage.BindingContext>
<ContentPage.ToolbarItems>
<ToolbarItem Text="&#xf002;" Clicked="Search_Clicked" />
<ToolbarItem Icon="search.png" Clicked="Search_Clicked" />
</ContentPage.ToolbarItems>
<ContentPage.Resources>

View file

@ -27,7 +27,7 @@
<Color x:Key="SliderThumbColor">#ffffff</Color>
<Color x:Key="SliderThumbBorderColor">#b5b5b5</Color>
<Color x:Key="SliderTrackColor">#52bdfb</Color>
<Color x:Key="SliderTrackColor">#111111</Color>
<Color x:Key="FabColor">#52bdfb</Color>
<Color x:Key="FabPressedColor">#449BCE</Color>

View file

@ -33,6 +33,6 @@
<Color x:Key="FabPressedColor">#3883af</Color>
<Color x:Key="TabBarBackgroundColor">#ffffff</Color>
<Color x:Key="TabBarItemColor">#C0C0C0</Color>
<Color x:Key="TabBarItemColor">#757575</Color>
<Color x:Key="TabBarSelectedItemColor">#3c8dbc</Color>
</ResourceDictionary>