From bb7c698c2ae377c1ff5808434107fc6fd61925fd Mon Sep 17 00:00:00 2001 From: HayleyKim0716 Date: Mon, 1 Aug 2022 22:24:51 +0900 Subject: [PATCH] =?UTF-8?q?#6=20feat/=EB=A9=94=EC=9D=B8=ED=99=94=EB=A9=B4?= =?UTF-8?q?=20:=20=EB=A9=94=EC=9D=B8=ED=99=94=EB=A9=B4=EC=9D=98=20BottomNa?= =?UTF-8?q?vigation=20=EC=95=84=EC=9D=B4=ED=85=9C=EC=9D=B4=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=EB=90=A0=20=EB=95=8C=20=EB=85=B8=EC=B6=9C=EB=90=A0=20?= =?UTF-8?q?Fragment=20=EC=B6=94=EA=B0=80=20-=20HomeFragment=20:=20?= =?UTF-8?q?=ED=99=88=20-=20MapFragment=20:=20=EC=A7=80=EB=8F=84=20-=20Favo?= =?UTF-8?q?riteFragment=20:=20=EC=B0=9C=ED=95=98=EA=B8=B0=20-=20MyPageFrag?= =?UTF-8?q?ment=20:=20MY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/main/favorite/FavoriteFragment.kt | 32 +++++++++++++++++++ .../ui/main/favorite/FavoriteViewModel.kt | 7 ++++ .../hometerview/ui/main/home/HomeFragment.kt | 32 +++++++++++++++++++ .../hometerview/ui/main/home/HomeViewModel.kt | 7 ++++ .../hometerview/ui/main/map/MapFragment.kt | 32 +++++++++++++++++++ .../hometerview/ui/main/map/MapViewModel.kt | 7 ++++ .../ui/main/mypage/MyPageFragment.kt | 32 +++++++++++++++++++ .../ui/main/mypage/MyPageViewModel.kt | 7 ++++ app/src/main/res/layout/fragment_favorite.xml | 15 +++++++++ app/src/main/res/layout/fragment_home.xml | 15 +++++++++ app/src/main/res/layout/fragment_map.xml | 15 +++++++++ app/src/main/res/layout/fragment_my_page.xml | 15 +++++++++ 12 files changed, 216 insertions(+) create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteFragment.kt create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteViewModel.kt create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/home/HomeFragment.kt create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/home/HomeViewModel.kt create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/map/MapFragment.kt create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/map/MapViewModel.kt create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageFragment.kt create mode 100644 app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageViewModel.kt create mode 100644 app/src/main/res/layout/fragment_favorite.xml create mode 100644 app/src/main/res/layout/fragment_home.xml create mode 100644 app/src/main/res/layout/fragment_map.xml create mode 100644 app/src/main/res/layout/fragment_my_page.xml diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteFragment.kt b/app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteFragment.kt new file mode 100644 index 0000000..fff88fe --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteFragment.kt @@ -0,0 +1,32 @@ +package com.ftw.hometerview.ui.main.favorite + +import androidx.lifecycle.ViewModelProvider +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import com.ftw.hometerview.R + +class FavoriteFragment : Fragment() { + + companion object { + fun newInstance() = FavoriteFragment() + } + + private lateinit var viewModel: FavoriteViewModel + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + return inflater.inflate(R.layout.fragment_favorite, container, false) + } + + override fun onActivityCreated(savedInstanceState: Bundle?) { + super.onActivityCreated(savedInstanceState) + viewModel = ViewModelProvider(this).get(FavoriteViewModel::class.java) + // TODO: Use the ViewModel + } + +} diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteViewModel.kt b/app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteViewModel.kt new file mode 100644 index 0000000..1d8c973 --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteViewModel.kt @@ -0,0 +1,7 @@ +package com.ftw.hometerview.ui.main.favorite + +import androidx.lifecycle.ViewModel + +class FavoriteViewModel : ViewModel() { + // TODO: Implement the ViewModel +} diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/home/HomeFragment.kt b/app/src/main/java/com/ftw/hometerview/ui/main/home/HomeFragment.kt new file mode 100644 index 0000000..119ca6b --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/home/HomeFragment.kt @@ -0,0 +1,32 @@ +package com.ftw.hometerview.ui.main.home + +import androidx.lifecycle.ViewModelProvider +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import com.ftw.hometerview.R + +class HomeFragment : Fragment() { + + companion object { + fun newInstance() = HomeFragment() + } + + private lateinit var viewModel: HomeViewModel + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + return inflater.inflate(R.layout.fragment_home, container, false) + } + + override fun onActivityCreated(savedInstanceState: Bundle?) { + super.onActivityCreated(savedInstanceState) + viewModel = ViewModelProvider(this).get(HomeViewModel::class.java) + // TODO: Use the ViewModel + } + +} diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/home/HomeViewModel.kt b/app/src/main/java/com/ftw/hometerview/ui/main/home/HomeViewModel.kt new file mode 100644 index 0000000..6681d81 --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/home/HomeViewModel.kt @@ -0,0 +1,7 @@ +package com.ftw.hometerview.ui.main.home + +import androidx.lifecycle.ViewModel + +class HomeViewModel : ViewModel() { + // TODO: Implement the ViewModel +} \ No newline at end of file diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/map/MapFragment.kt b/app/src/main/java/com/ftw/hometerview/ui/main/map/MapFragment.kt new file mode 100644 index 0000000..7f2b25e --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/map/MapFragment.kt @@ -0,0 +1,32 @@ +package com.ftw.hometerview.ui.main.map + +import androidx.lifecycle.ViewModelProvider +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import com.ftw.hometerview.R + +class MapFragment : Fragment() { + + companion object { + fun newInstance() = MapFragment() + } + + private lateinit var viewModel: MapViewModel + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + return inflater.inflate(R.layout.fragment_map, container, false) + } + + override fun onActivityCreated(savedInstanceState: Bundle?) { + super.onActivityCreated(savedInstanceState) + viewModel = ViewModelProvider(this).get(MapViewModel::class.java) + // TODO: Use the ViewModel + } + +} diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/map/MapViewModel.kt b/app/src/main/java/com/ftw/hometerview/ui/main/map/MapViewModel.kt new file mode 100644 index 0000000..d918403 --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/map/MapViewModel.kt @@ -0,0 +1,7 @@ +package com.ftw.hometerview.ui.main.map + +import androidx.lifecycle.ViewModel + +class MapViewModel : ViewModel() { + // TODO: Implement the ViewModel +} diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageFragment.kt b/app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageFragment.kt new file mode 100644 index 0000000..1ed264f --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageFragment.kt @@ -0,0 +1,32 @@ +package com.ftw.hometerview.ui.main.mypage + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment +import androidx.lifecycle.ViewModelProvider +import com.ftw.hometerview.R + +class MyPageFragment : Fragment() { + + companion object { + fun newInstance() = MyPageFragment() + } + + private lateinit var viewModel: MyPageViewModel + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + return inflater.inflate(R.layout.fragment_my_page, container, false) + } + + override fun onActivityCreated(savedInstanceState: Bundle?) { + super.onActivityCreated(savedInstanceState) + viewModel = ViewModelProvider(this).get(MyPageViewModel::class.java) + // TODO: Use the ViewModel + } +} diff --git a/app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageViewModel.kt b/app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageViewModel.kt new file mode 100644 index 0000000..e5e6eaf --- /dev/null +++ b/app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageViewModel.kt @@ -0,0 +1,7 @@ +package com.ftw.hometerview.ui.main.mypage + +import androidx.lifecycle.ViewModel + +class MyPageViewModel : ViewModel() { + // TODO: Implement the ViewModel +} diff --git a/app/src/main/res/layout/fragment_favorite.xml b/app/src/main/res/layout/fragment_favorite.xml new file mode 100644 index 0000000..b18aa0d --- /dev/null +++ b/app/src/main/res/layout/fragment_favorite.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml new file mode 100644 index 0000000..60d48b8 --- /dev/null +++ b/app/src/main/res/layout/fragment_home.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml new file mode 100644 index 0000000..fb691e5 --- /dev/null +++ b/app/src/main/res/layout/fragment_map.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/app/src/main/res/layout/fragment_my_page.xml b/app/src/main/res/layout/fragment_my_page.xml new file mode 100644 index 0000000..ea8a532 --- /dev/null +++ b/app/src/main/res/layout/fragment_my_page.xml @@ -0,0 +1,15 @@ + + + + + +