diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index b5efba744..3081a7847 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -24,13 +24,15 @@
+ android:exported="false" />
+
+ android:targetActivity=".activities.MainActivity">
@@ -70,7 +72,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_fire_round"
android:supportsPictureInPicture="true"
- android:targetActivity=".MainActivity">
+ android:targetActivity=".activities.MainActivity">
@@ -87,7 +89,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_flame_round"
android:supportsPictureInPicture="true"
- android:targetActivity=".MainActivity">
+ android:targetActivity=".activities.MainActivity">
@@ -104,7 +106,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_shaped_round"
android:supportsPictureInPicture="true"
- android:targetActivity=".MainActivity">
+ android:targetActivity=".activities.MainActivity">
@@ -121,7 +123,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_torch_round"
android:supportsPictureInPicture="true"
- android:targetActivity=".MainActivity">
+ android:targetActivity=".activities.MainActivity">
@@ -138,7 +140,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_legacy_round"
android:supportsPictureInPicture="true"
- android:targetActivity=".MainActivity">
+ android:targetActivity=".activities.MainActivity">
@@ -155,7 +157,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_bird_round"
android:supportsPictureInPicture="true"
- android:targetActivity=".MainActivity">
+ android:targetActivity=".activities.MainActivity">
@@ -163,7 +165,7 @@
diff --git a/app/src/main/java/com/github/libretube/MainActivity.kt b/app/src/main/java/com/github/libretube/activities/MainActivity.kt
similarity index 95%
rename from app/src/main/java/com/github/libretube/MainActivity.kt
rename to app/src/main/java/com/github/libretube/activities/MainActivity.kt
index 459bb8d4a..e47cc3605 100644
--- a/app/src/main/java/com/github/libretube/MainActivity.kt
+++ b/app/src/main/java/com/github/libretube/activities/MainActivity.kt
@@ -1,4 +1,4 @@
-package com.github.libretube
+package com.github.libretube.activities
import android.app.Activity
import android.content.Context
@@ -19,11 +19,8 @@ import android.view.WindowInsets
import android.view.WindowInsetsController
import android.view.WindowManager
import android.view.inputmethod.InputMethodManager
-import android.widget.Button
-import android.widget.ImageView
import android.widget.LinearLayout
import androidx.appcompat.app.AppCompatActivity
-import androidx.appcompat.widget.Toolbar
import androidx.constraintlayout.motion.widget.MotionLayout
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.os.bundleOf
@@ -32,6 +29,7 @@ import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.findNavController
import androidx.navigation.ui.setupWithNavController
+import com.github.libretube.R
import com.github.libretube.databinding.ActivityMainBinding
import com.github.libretube.fragments.PlayerFragment
import com.github.libretube.fragments.isFullScreen
@@ -50,7 +48,6 @@ class MainActivity : AppCompatActivity() {
lateinit var binding: ActivityMainBinding
private lateinit var bottomNavigationView: BottomNavigationView
- private lateinit var toolbar: Toolbar
lateinit var navController: NavController
override fun onCreate(savedInstanceState: Bundle?) {
@@ -70,14 +67,8 @@ class MainActivity : AppCompatActivity() {
// show noInternet Activity if no internet available on app startup
if (!isNetworkAvailable(this)) {
- setContentView(R.layout.activity_nointernet)
- findViewById