diff --git a/app/build.gradle b/app/build.gradle
index e6cbc668..2c60aa7f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -59,30 +59,6 @@ dependencies {
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
- // 内部モジュール
- // Feature
- implementation project(':feature:home')
- implementation project(':feature:search')
- implementation project(':feature:library')
- implementation project(':feature:scan')
- implementation project(':feature:debug') // デバッグメニュー
-
-// // Component
-// implementation project(':component:common')
-// implementation project(':component:scanner')
-// implementation project(':component:viewer')
-
-// // Data
-// implementation project(':data:repository')
-//
-// // Source
-// implementation project(':data:source:database')
-// implementation project(':data:source:preference')
-//
- implementation project(':data')
-
- implementation project(':shared:ui')
-
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
@@ -92,4 +68,13 @@ dependencies {
implementation libs.navigation.ui
implementation libs.navigation.dynamic.features.fragment
+ // Feature
+ implementation project(':feature:home')
+ implementation project(':feature:search')
+ implementation project(':feature:library')
+ implementation project(':feature:scan')
+ implementation project(':feature:debug') // デバッグメニュー
+
+ implementation project(':data')
+ implementation project(':shared:ui')
}
\ No newline at end of file
diff --git a/app/src/main/java/one/nem/lacerta/LacertaApplication.java b/app/src/main/java/one/nem/lacerta/LacertaApplication.java
index d8103ea2..448349b5 100644
--- a/app/src/main/java/one/nem/lacerta/LacertaApplication.java
+++ b/app/src/main/java/one/nem/lacerta/LacertaApplication.java
@@ -1,6 +1,7 @@
package one.nem.lacerta;
import android.app.Application;
+import android.util.Log;
import com.google.android.material.color.DynamicColors;
@@ -12,8 +13,12 @@ public class LacertaApplication extends Application {
public void onCreate() {
super.onCreate();
- // DynamicColorを有効化
- DynamicColors.applyToActivitiesIfAvailable(this);
+ if (DynamicColors.isDynamicColorAvailable()) {
+ Log.d("DynamicColors", "DynamicColors is available. Applying to activities...");
+ DynamicColors.applyToActivitiesIfAvailable(this);
+ } else {
+ Log.d("DynamicColors", "DynamicColors is not available.");
+ }
}
diff --git a/app/src/main/java/one/nem/lacerta/MainActivity.java b/app/src/main/java/one/nem/lacerta/MainActivity.java
index d89e0ce3..f1fa4676 100644
--- a/app/src/main/java/one/nem/lacerta/MainActivity.java
+++ b/app/src/main/java/one/nem/lacerta/MainActivity.java
@@ -9,6 +9,7 @@ import androidx.navigation.ui.NavigationUI;
import android.graphics.Color;
import android.os.Bundle;
+import android.util.Log;
import android.widget.Toast;
import com.google.android.material.bottomnavigation.BottomNavigationView;
@@ -27,20 +28,23 @@ public class MainActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
- // Debug
- FragmentManager supportFragmentManager = getSupportFragmentManager();
-
- NavHostFragment navHostFragment = (NavHostFragment) supportFragmentManager.findFragmentById(R.id.nav_host_fragment);
- NavController navController = navHostFragment.getNavController();
- BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav);
-
- NavigationUI.setupWithNavController(bottomNavigationView, navController);
-
- Toast.makeText(this, "testMessage", Toast.LENGTH_SHORT).show();
+ // Init navigation
+ try {
+ FragmentManager supportFragmentManager = getSupportFragmentManager();
+ NavHostFragment navHostFragment = (NavHostFragment) supportFragmentManager.findFragmentById(R.id.nav_host_fragment);
+ assert navHostFragment != null;
+ NavController navController = navHostFragment.getNavController();
+ BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav);
+ NavigationUI.setupWithNavController(bottomNavigationView, navController);
+ }
+ catch (Exception e) {
+ Log.e("Init", "Failed to init navigation");
+ Log.e("Init", "Searchable Error code: " + "894b5941-3bc0-46fe-b752-0dbc88be29a8");
+ Toast.makeText(this, "Failed to init navigation", Toast.LENGTH_LONG).show();
+ finish(); // Exit app
+ }
+ // Set navigation bar color
getWindow().setNavigationBarColor(ContextCompat.getColor(this, one.nem.lacerta.shared.ui.R.color.colorSurfaceVariant));
-
-
}
-
}
diff --git a/app/src/main/res/menu/bottom_nav_menu.xml b/app/src/main/res/menu/bottom_nav_menu.xml
index ef93e718..7112a85c 100644
--- a/app/src/main/res/menu/bottom_nav_menu.xml
+++ b/app/src/main/res/menu/bottom_nav_menu.xml
@@ -6,20 +6,19 @@
android:icon="@drawable/home_24px"
android:title="Home"/>
-
-
+
+
-
\ No newline at end of file
diff --git a/shared/ui/src/main/res/values-ja/strings.xml b/shared/ui/src/main/res/values-ja/strings.xml
new file mode 100644
index 00000000..0d2c4cc4
--- /dev/null
+++ b/shared/ui/src/main/res/values-ja/strings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file