From 1c87b73a5b0340dd56dddcfb74406fdcb5fb423e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:05:44 +0900 Subject: [PATCH 01/10] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E7=94=A8?= =?UTF-8?q?=E3=81=AB=E8=A8=AD=E7=BD=AE=E3=81=97=E3=81=A6=E3=81=84=E3=81=9F?= =?UTF-8?q?=E3=83=88=E3=83=BC=E3=82=B9=E3=83=88=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/one/nem/lacerta/MainActivity.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/one/nem/lacerta/MainActivity.java b/app/src/main/java/one/nem/lacerta/MainActivity.java index d89e0ce3..b1d68a43 100644 --- a/app/src/main/java/one/nem/lacerta/MainActivity.java +++ b/app/src/main/java/one/nem/lacerta/MainActivity.java @@ -36,8 +36,6 @@ public class MainActivity extends AppCompatActivity { NavigationUI.setupWithNavController(bottomNavigationView, navController); - Toast.makeText(this, "testMessage", Toast.LENGTH_SHORT).show(); - getWindow().setNavigationBarColor(ContextCompat.getColor(this, one.nem.lacerta.shared.ui.R.color.colorSurfaceVariant)); From 42eb3d4c80497dcbd6065fbbab2f27d0943363c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:07:23 +0900 Subject: [PATCH 02/10] =?UTF-8?q?utils=E3=82=92=E4=BE=9D=E5=AD=98=E9=96=A2?= =?UTF-8?q?=E4=BF=82=E3=81=AB=E8=BF=BD=E5=8A=A0,=20Logger=E3=82=92Inject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index e6cbc668..45117389 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -83,6 +83,8 @@ dependencies { implementation project(':shared:ui') + implementation project(':utils') + // Hilt (DI) implementation libs.com.google.dagger.hilt.android annotationProcessor libs.com.google.dagger.hilt.compiler From 169a6c6e0ab403647539c4d7469002798bb92e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:07:27 +0900 Subject: [PATCH 03/10] =?UTF-8?q?utils=E3=82=92=E4=BE=9D=E5=AD=98=E9=96=A2?= =?UTF-8?q?=E4=BF=82=E3=81=AB=E8=BF=BD=E5=8A=A0,=20Logger=E3=82=92Inject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/one/nem/lacerta/MainActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/one/nem/lacerta/MainActivity.java b/app/src/main/java/one/nem/lacerta/MainActivity.java index b1d68a43..73562936 100644 --- a/app/src/main/java/one/nem/lacerta/MainActivity.java +++ b/app/src/main/java/one/nem/lacerta/MainActivity.java @@ -11,6 +11,8 @@ import android.graphics.Color; import android.os.Bundle; import android.widget.Toast; +import one.nem.lacerta.utils.LacertaLogger; + import com.google.android.material.bottomnavigation.BottomNavigationView; @@ -22,6 +24,9 @@ import javax.inject.Inject; @AndroidEntryPoint public class MainActivity extends AppCompatActivity { + @Inject + LacertaLogger logger; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); From cc7b0dc5d1d497bdab1f51bceb1581f7b03377ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:07:34 +0900 Subject: [PATCH 04/10] =?UTF-8?q?Revert=20"utils=E3=82=92=E4=BE=9D?= =?UTF-8?q?=E5=AD=98=E9=96=A2=E4=BF=82=E3=81=AB=E8=BF=BD=E5=8A=A0,=20Logge?= =?UTF-8?q?r=E3=82=92Inject"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 169a6c6e0ab403647539c4d7469002798bb92e3d. --- app/src/main/java/one/nem/lacerta/MainActivity.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/java/one/nem/lacerta/MainActivity.java b/app/src/main/java/one/nem/lacerta/MainActivity.java index 73562936..b1d68a43 100644 --- a/app/src/main/java/one/nem/lacerta/MainActivity.java +++ b/app/src/main/java/one/nem/lacerta/MainActivity.java @@ -11,8 +11,6 @@ import android.graphics.Color; import android.os.Bundle; import android.widget.Toast; -import one.nem.lacerta.utils.LacertaLogger; - import com.google.android.material.bottomnavigation.BottomNavigationView; @@ -24,9 +22,6 @@ import javax.inject.Inject; @AndroidEntryPoint public class MainActivity extends AppCompatActivity { - @Inject - LacertaLogger logger; - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); From fc712a131ae20cf3fd43b7c17e26707874b844fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:07:35 +0900 Subject: [PATCH 05/10] =?UTF-8?q?Revert=20"utils=E3=82=92=E4=BE=9D?= =?UTF-8?q?=E5=AD=98=E9=96=A2=E4=BF=82=E3=81=AB=E8=BF=BD=E5=8A=A0,=20Logge?= =?UTF-8?q?r=E3=82=92Inject"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 42eb3d4c80497dcbd6065fbbab2f27d0943363c1. --- app/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 45117389..e6cbc668 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -83,8 +83,6 @@ dependencies { implementation project(':shared:ui') - implementation project(':utils') - // Hilt (DI) implementation libs.com.google.dagger.hilt.android annotationProcessor libs.com.google.dagger.hilt.compiler From 725d541316b082b387effa247963dcce82d97561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:14:08 +0900 Subject: [PATCH 06/10] =?UTF-8?q?=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF?= =?UTF-8?q?=E3=82=BF=E3=83=AA=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/MainActivity.java | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/one/nem/lacerta/MainActivity.java b/app/src/main/java/one/nem/lacerta/MainActivity.java index b1d68a43..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,18 +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); + // 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)); - - } - } From 244b2fb123496bc4c9476bb5f56ac4c3b9e0902c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:15:46 +0900 Subject: [PATCH 07/10] =?UTF-8?q?=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF?= =?UTF-8?q?=E3=82=BF=E3=83=AA=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/one/nem/lacerta/LacertaApplication.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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."); + } } From 29f2749cb7de04935c957a9d67dc7bf2758a16a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:16:20 +0900 Subject: [PATCH 08/10] =?UTF-8?q?=E6=95=B4=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) 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 From 3e12f1222bce16edd8789bad82f48a4c1b64ba5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:17:44 +0900 Subject: [PATCH 09/10] =?UTF-8?q?=E3=83=8A=E3=83=93=E3=82=B2=E3=83=BC?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=AE=E4=B8=A6=E3=81=B3=E9=A0=86?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/menu/bottom_nav_menu.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 From 184771c92d7afdbfc686d82199de6f0dbfce3870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 15:19:15 +0900 Subject: [PATCH 10/10] =?UTF-8?q?=E3=83=AA=E3=82=BD=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=82=92=E5=88=87=E3=82=8A=E5=87=BA=E3=81=99=E6=BA=96=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/ui/src/main/res/values-ja/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 shared/ui/src/main/res/values-ja/strings.xml 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