Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add launchscreen on android

ammarahm-ed7a44cab63798
diff --git a/apps/mobile/android/app/src/main/assets/fonts/DMSans-Bold.ttf b/apps/mobile/android/app/src/main/assets/fonts/DMSans-Bold.ttf
new file mode 100755
index 000000000..7fd94a28b
Binary files /dev/null and b/apps/mobile/android/app/src/main/assets/fonts/DMSans-Bold.ttf differ
diff --git a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java
index d1c0b254f..b013c6d87 100644
--- a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java
+++ b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java
@@ -3,7 +3,9 @@ package com.streetwriters.notesnook;
import com.facebook.react.ReactActivity;
import android.content.Intent;
import android.content.res.Configuration;
+import android.os.Bundle;
+import org.devio.rn.splashscreen.SplashScreen;
public class MainActivity extends ReactActivity {
@@ -11,6 +13,14 @@ public class MainActivity extends ReactActivity {
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+
+ SplashScreen.show(this);
+
+ super.onCreate(savedInstanceState);
+ }
+
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
diff --git a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainApplication.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainApplication.java
index 6d9440455..555c395d5 100644
--- a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainApplication.java
+++ b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainApplication.java
@@ -12,6 +12,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.List;
import androidx.multidex.MultiDexApplication;
+
public class MainApplication extends MultiDexApplication implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
diff --git a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MyTextView.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MyTextView.java
index e69de29bb..6c5314ad8 100644
--- a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MyTextView.java
+++ b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MyTextView.java
@@ -0,0 +1,31 @@
+package com.streetwriters.notesnook;
+
+import android.content.Context;
+import android.graphics.Typeface;
+import android.util.AttributeSet;
+import androidx.appcompat.widget.AppCompatTextView;
+
+
+public class MyTextView extends AppCompatTextView {
+
+ public MyTextView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init();
+ }
+
+ public MyTextView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public MyTextView(Context context) {
+ super(context);
+ init();
+ }
+
+ public void init() {
+ Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "fonts/DMSerifText-Regular.ttf");
+ setTypeface(tf);
+
+ }
+}
\ No newline at end of file
diff --git a/apps/mobile/android/app/src/main/res/layout/launch_screen.xml b/apps/mobile/android/app/src/main/res/layout/launch_screen.xml
new file mode 100644
index 000000000..4543dc4cd
--- /dev/null
+++ b/apps/mobile/android/app/src/main/res/layout/launch_screen.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout android:background="#0560FF" xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical" android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ >
+
+ <com.streetwriters.notesnook.MyTextView
+ android:id="@+id/textview"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:text="Notesnook"
+ android:textAlignment="center"
+ android:textColor="#FFFFFF"
+ android:textSize="40sp"
+ android:textStyle="bold"
+ android:typeface="serif" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/apps/mobile/android/app/src/main/res/values/colors.xml b/apps/mobile/android/app/src/main/res/values/colors.xml
new file mode 100644
index 000000000..a6b3daec9
--- /dev/null
+++ b/apps/mobile/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources></resources>
\ No newline at end of file
diff --git a/apps/mobile/ios/Notesnook/AppDelegate.m b/apps/mobile/ios/Notesnook/AppDelegate.m
index d98f807df..aa0dac1e3 100644
--- a/apps/mobile/ios/Notesnook/AppDelegate.m
+++ b/apps/mobile/ios/Notesnook/AppDelegate.m
@@ -3,6 +3,7 @@
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
+#import "RNSplashScreen.h"
#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
@@ -43,6 +44,8 @@ static void InitializeFlipper(UIApplication *application) {
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
+ [RNSplashScreen show];
+
return YES;
}