From 8ae9f0fe85a5522a334e598f2f628d9b59a73d27 Mon Sep 17 00:00:00 2001 From: soohyun Date: Fri, 27 Nov 2020 23:03:53 +0900 Subject: [PATCH 1/2] init: new branch --- .../ui/SplashActivity.java | 2 +- .../ui/main/MainActivity.java | 11 ++++-- .../res/drawable/ic_check_box_black_24dp.xml | 9 +++++ .../res/drawable/ic_menu_book_black_24dp.xml | 18 ++++++++++ .../drawable/ic_military_tech_black_24dp.xml | 9 +++++ .../res/drawable/ic_person_black_24dp.xml | 9 +++++ app/src/main/res/layout/activity_main.xml | 23 +++++++++---- app/src/main/res/layout/fragment_changepw.xml | 17 +++++++--- app/src/main/res/layout/fragment_profile.xml | 20 +++++------ app/src/main/res/menu/bottom_menu.xml | 34 +++++++++++++++++++ app/src/main/res/menu/bottomnavigation.xml | 4 --- app/src/main/res/navigation/nav_user.xml | 14 ++++---- 12 files changed, 134 insertions(+), 36 deletions(-) create mode 100644 app/src/main/res/drawable/ic_check_box_black_24dp.xml create mode 100644 app/src/main/res/drawable/ic_menu_book_black_24dp.xml create mode 100644 app/src/main/res/drawable/ic_military_tech_black_24dp.xml create mode 100644 app/src/main/res/drawable/ic_person_black_24dp.xml create mode 100644 app/src/main/res/menu/bottom_menu.xml delete mode 100644 app/src/main/res/menu/bottomnavigation.xml diff --git a/app/src/main/java/com/example/wordmemorizationgame/ui/SplashActivity.java b/app/src/main/java/com/example/wordmemorizationgame/ui/SplashActivity.java index 2af459c..ccb4e0e 100644 --- a/app/src/main/java/com/example/wordmemorizationgame/ui/SplashActivity.java +++ b/app/src/main/java/com/example/wordmemorizationgame/ui/SplashActivity.java @@ -27,7 +27,7 @@ void startSplash() { @Override public void run() { // - Intent intent = new Intent(getApplicationContext(),UserActivity.class); + Intent intent = new Intent(getApplicationContext(),MainActivity.class); startActivity(intent); finish(); } diff --git a/app/src/main/java/com/example/wordmemorizationgame/ui/main/MainActivity.java b/app/src/main/java/com/example/wordmemorizationgame/ui/main/MainActivity.java index d026ceb..eb85cb3 100644 --- a/app/src/main/java/com/example/wordmemorizationgame/ui/main/MainActivity.java +++ b/app/src/main/java/com/example/wordmemorizationgame/ui/main/MainActivity.java @@ -1,19 +1,24 @@ package com.example.wordmemorizationgame.ui.main; import androidx.appcompat.app.AppCompatActivity; +import androidx.navigation.fragment.NavHostFragment; +import androidx.navigation.ui.NavigationUI; import android.os.Bundle; import com.example.wordmemorizationgame.R; +import com.google.android.material.bottomnavigation.BottomNavigationView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { - // MainActivity - // develop - // branch + super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + + BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_navi); + NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().findFragmentById(R.id.navHost_main); + NavigationUI.setupWithNavController(bottomNavigationView,navHostFragment.getNavController()); } } \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_check_box_black_24dp.xml b/app/src/main/res/drawable/ic_check_box_black_24dp.xml new file mode 100644 index 0000000..90257bf --- /dev/null +++ b/app/src/main/res/drawable/ic_check_box_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_menu_book_black_24dp.xml b/app/src/main/res/drawable/ic_menu_book_black_24dp.xml new file mode 100644 index 0000000..11a8db8 --- /dev/null +++ b/app/src/main/res/drawable/ic_menu_book_black_24dp.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_military_tech_black_24dp.xml b/app/src/main/res/drawable/ic_military_tech_black_24dp.xml new file mode 100644 index 0000000..872d496 --- /dev/null +++ b/app/src/main/res/drawable/ic_military_tech_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_person_black_24dp.xml b/app/src/main/res/drawable/ic_person_black_24dp.xml new file mode 100644 index 0000000..5634154 --- /dev/null +++ b/app/src/main/res/drawable/ic_person_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 70aebdf..2ee0224 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -7,12 +7,21 @@ tools:context=".ui.main.MainActivity"> + + + app:menu="@menu/bottom_menu" + tools:layout_editor_absoluteX="16dp" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_changepw.xml b/app/src/main/res/layout/fragment_changepw.xml index 707d60c..4bf32bd 100644 --- a/app/src/main/res/layout/fragment_changepw.xml +++ b/app/src/main/res/layout/fragment_changepw.xml @@ -2,6 +2,8 @@ + android:textSize="18sp" /> + android:textSize="18sp"/> + android:textSize="18sp"/> + +