Skip to content

Commit

Permalink
splash screen created
Browse files Browse the repository at this point in the history
  • Loading branch information
Arieldelossantos committed May 14, 2020
1 parent b5d0210 commit 4bf1c03
Show file tree
Hide file tree
Showing 14 changed files with 449 additions and 368 deletions.
13 changes: 13 additions & 0 deletions COVIDsStat.Android/COVIDsStat.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SplashActivity.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
Expand All @@ -112,6 +113,18 @@
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\drawable\splash.png">
<SubType></SubType>
<Generator></Generator>
</AndroidResource>
<AndroidResource Include="Resources\drawable\placeholder.gif">
<SubType></SubType>
<Generator></Generator>
</AndroidResource>
<AndroidResource Include="Resources\drawable\splash_screen.xml">
<SubType></SubType>
<Generator></Generator>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
Expand Down
2 changes: 1 addition & 1 deletion COVIDsStat.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace COVIDsStat.Droid
{
[Activity(Label = "COVIDsStat", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(Label = "COVIDsStat", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = false, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
Expand Down
719 changes: 367 additions & 352 deletions COVIDsStat.Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added COVIDsStat.Android/Resources/drawable/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions COVIDsStat.Android/Resources/drawable/splash_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@color/splash_background"/>
</item>
<item android:bottom="100dp">
<bitmap
android:src="@drawable/splash"
android:tileMode="disabled"
android:gravity="center"/>
</item>


</layer-list>
1 change: 1 addition & 0 deletions COVIDsStat.Android/Resources/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="splash_background">#E6E6E6</color>
</resources>
9 changes: 9 additions & 0 deletions COVIDsStat.Android/Resources/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>

<style name="MyTheme.Splash" parent ="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowActionBar">true</item>
</style>

<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
Expand Down
19 changes: 19 additions & 0 deletions COVIDsStat.Android/SplashActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using Android.App;
using Android.OS;
using Android.Support.V7.App;

namespace COVIDsStat.Droid
{
[Activity(Label = "COVID Stats", Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
public class SplashActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
StartActivity(typeof(MainActivity));
Finish();
}

}
}
1 change: 1 addition & 0 deletions COVIDsStat.iOS/COVIDsStat.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,6 @@
<BundleResource Include="Resources\placeholder.gif" />
<BundleResource Include="Resources\placeholder%402x.gif" />
<BundleResource Include="Resources\placeholder%403x.gif" />
<BundleResource Include="Resources\splash.png" />
</ItemGroup>
</Project>
31 changes: 17 additions & 14 deletions COVIDsStat.iOS/Resources/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238" />
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="gAE-YM-kbH">
<objects>
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43" />
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ" />
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="600" height="600" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace" white="0.901960784313726" alpha="1"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="270" y="270" width="60" height="60" />
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0" />
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="243" translatesAutoresizingMaskIntoConstraints="NO" image="splash.png">
<rect key="frame" x="72" y="266" width="271" height="204"/>
<constraints>
<constraint id="653" firstAttribute="height" constant="204"/>
<constraint id="654" firstAttribute="width" constant="271"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB" />
<constraints>
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39" />
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41" />
<constraint id="651" firstItem="243" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY"/>
<constraint id="652" firstItem="243" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder" />
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="349" y="339" />
<point key="canvasLocation" x="349" y="339"/>
</scene>
</scenes>
<resources>
<image name="Icon-60.png" width="180" height="180" />
<image name="splash.png" width="719" height="720"/>
</resources>
</document>
Binary file added COVIDsStat.iOS/Resources/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion COVIDsStat/App.xaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="COVIDsStat.App">
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="COVIDsStat.App">
<Application.Resources>
</Application.Resources>
</Application>
1 change: 1 addition & 0 deletions COVIDsStat/Views/Templates/CountriesItemTemplate.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
HeightRequest="90" WidthRequest="90">

<ffimageloadingsvg:SvgCachedImage Aspect="AspectFill"
LoadingPlaceholder="placeholder"
HeightRequest="110"
WidthRequest="110"
Source="{Binding Flag}"/>
Expand Down

0 comments on commit 4bf1c03

Please sign in to comment.