mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
commit
4101f75685
|
@ -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')
|
||||
}
|
|
@ -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.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,20 +6,19 @@
|
|||
android:icon="@drawable/home_24px"
|
||||
android:title="Home"/>
|
||||
|
||||
<item
|
||||
android:id="@id/feature_library_navigation"
|
||||
android:icon="@drawable/folder_24px"
|
||||
android:title="Library"/>
|
||||
|
||||
<item
|
||||
android:id="@id/feature_search_navigation"
|
||||
android:icon="@drawable/search_24px"
|
||||
android:title="Search"/>
|
||||
|
||||
<item
|
||||
android:id="@id/feature_library_navigation"
|
||||
android:icon="@drawable/folder_24px"
|
||||
android:title="Library"/>
|
||||
|
||||
<item
|
||||
android:id="@id/feature_debug_navigation"
|
||||
android:icon="@drawable/developer_mode_24px"
|
||||
android:title="Debug menu"/>
|
||||
|
||||
|
||||
</menu>
|
4
shared/ui/src/main/res/values-ja/strings.xml
Normal file
4
shared/ui/src/main/res/values-ja/strings.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user