-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6 feat/메인화면 : 메인화면의 BottomNavigation 아이템이 선택될 때 노출될 Fragment 추가
- HomeFragment : 홈 - MapFragment : 지도 - FavoriteFragment : 찜하기 - MyPageFragment : MY
- Loading branch information
1 parent
ba1d9b1
commit bb7c698
Showing
12 changed files
with
216 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/ftw/hometerview/ui/main/favorite/FavoriteViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.ftw.hometerview.ui.main.favorite | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class FavoriteViewModel : ViewModel() { | ||
// TODO: Implement the ViewModel | ||
} |
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/ftw/hometerview/ui/main/home/HomeFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/ftw/hometerview/ui/main/home/HomeViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.ftw.hometerview.ui.main.home | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class HomeViewModel : ViewModel() { | ||
// TODO: Implement the ViewModel | ||
} |
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/ftw/hometerview/ui/main/map/MapFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/ftw/hometerview/ui/main/map/MapViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.ftw.hometerview.ui.main.map | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class MapViewModel : ViewModel() { | ||
// TODO: Implement the ViewModel | ||
} |
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/ftw/hometerview/ui/main/mypage/MyPageViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.ftw.hometerview.ui.main.mypage | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class MyPageViewModel : ViewModel() { | ||
// TODO: Implement the ViewModel | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".ui.main.favorite.FavoriteFragment" | ||
> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:text="FavoriteFragment" | ||
/> | ||
|
||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".ui.main.home.HomeFragment" | ||
> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:text="HomeFragment" | ||
/> | ||
|
||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".ui.main.map.MapFragment" | ||
> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:text="MapFragment" | ||
/> | ||
|
||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".ui.main.mypage.MyPageFragment" | ||
> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:text="MyPageFragment" | ||
/> | ||
|
||
</FrameLayout> |