From bcaa0e5c5c8ddb7610502dd721888fbeac6709ad 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 17:35:55 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit cbc1d139afcd46370eda035e544152f3db3fc8bd. --- app/src/main/res/layout/activity_main.xml | 59 ++++++++++++------- app/src/main/res/menu/drawer_menu.xml | 7 +++ .../lacerta/feature/home/HomeTopFragment.java | 3 +- .../src/main/res/layout/fragment_home_top.xml | 14 +---- .../home/src/main/res/menu/drawer_menu.xml | 4 -- 5 files changed, 49 insertions(+), 38 deletions(-) create mode 100644 app/src/main/res/menu/drawer_menu.xml diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 2117b2e1..b726cd3b 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,32 +1,47 @@ - - + - + + + + + + + + + - \ No newline at end of file diff --git a/app/src/main/res/menu/drawer_menu.xml b/app/src/main/res/menu/drawer_menu.xml new file mode 100644 index 00000000..9041ecda --- /dev/null +++ b/app/src/main/res/menu/drawer_menu.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java index 0b1c39a5..d093709c 100644 --- a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java +++ b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java @@ -118,7 +118,8 @@ public class HomeTopFragment extends Fragment { // Set the Toolbar ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar); - DrawerLayout drawer = view.findViewById(R.id.drawer_layout); + // Activity側のDrawerLayoutを取得 + DrawerLayout drawer = getActivity().findViewById(R.id.); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( getActivity(), drawer, toolbar, one.nem.lacerta.shared.ui.R.string.placeholder, one.nem.lacerta.shared.ui.R.string.placeholder); drawer.addDrawerListener(toggle); diff --git a/feature/home/src/main/res/layout/fragment_home_top.xml b/feature/home/src/main/res/layout/fragment_home_top.xml index 9f6268a3..fb74430d 100644 --- a/feature/home/src/main/res/layout/fragment_home_top.xml +++ b/feature/home/src/main/res/layout/fragment_home_top.xml @@ -1,6 +1,5 @@ - @@ -30,7 +29,7 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" - app:title="HOGE"/> + app:title="HOGE" /> @@ -62,11 +61,4 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/feature/home/src/main/res/menu/drawer_menu.xml b/feature/home/src/main/res/menu/drawer_menu.xml index 0cc72028..fe187c0c 100644 --- a/feature/home/src/main/res/menu/drawer_menu.xml +++ b/feature/home/src/main/res/menu/drawer_menu.xml @@ -1,8 +1,4 @@ - \ No newline at end of file