File tree Expand file tree Collapse file tree 6 files changed +35
-7
lines changed
java/com/whyranoid/presentation/community Expand file tree Collapse file tree 6 files changed +35
-7
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ internal class CommunityFragment :
28
28
// TODO 게시글, 내가 쓴 글 추가 필요
29
29
override fun onTabSelected (tab : TabLayout .Tab ? ) {
30
30
when (tab?.position) {
31
+ CommunityCategory .BOARD .ordinal -> {
32
+ binding.topAppBar.inflateMenu(R .menu.community_go_to_create_running_post_menu)
33
+ }
34
+
31
35
CommunityCategory .MY_GROUP .ordinal -> {
32
36
binding.topAppBar.inflateMenu(R .menu.my_group_menu)
33
37
}
@@ -40,6 +44,9 @@ internal class CommunityFragment :
40
44
CommunityCategory .MY_GROUP .ordinal -> {
41
45
binding.topAppBar.menu.clear()
42
46
}
47
+ CommunityCategory .BOARD .ordinal -> {
48
+ binding.topAppBar.menu.clear()
49
+ }
43
50
}
44
51
}
45
52
@@ -60,6 +67,14 @@ internal class CommunityFragment :
60
67
findNavController().navigate(action)
61
68
true
62
69
}
70
+
71
+ R .id.go_to_create_running_post -> {
72
+ val action =
73
+ CommunityFragmentDirections .actionCommunityFragmentToSelectRunningHistoryFragment()
74
+ findNavController().navigate(action)
75
+ true
76
+ }
77
+
63
78
else -> {
64
79
false
65
80
}
Original file line number Diff line number Diff line change @@ -118,11 +118,11 @@ internal class CreateGroupFragment :
118
118
viewLifecycleOwner.repeatWhenUiStarted {
119
119
viewModel.isGroupCreateButtonEnable.collect { isEnable ->
120
120
if (isEnable) {
121
- binding.topAppBar.menu.setGroupVisible(R .id.ready_to_create , true )
122
- binding.topAppBar.menu.setGroupVisible(R .id.not_ready_to_create , false )
121
+ binding.topAppBar.menu.setGroupVisible(R .id.ready_to_create_running_post , true )
122
+ binding.topAppBar.menu.setGroupVisible(R .id.not_ready_to_create_running_post , false )
123
123
} else {
124
- binding.topAppBar.menu.setGroupVisible(R .id.ready_to_create , false )
125
- binding.topAppBar.menu.setGroupVisible(R .id.not_ready_to_create , true )
124
+ binding.topAppBar.menu.setGroupVisible(R .id.ready_to_create_running_post , false )
125
+ binding.topAppBar.menu.setGroupVisible(R .id.not_ready_to_create_running_post , true )
126
126
}
127
127
}
128
128
}
Original file line number Diff line number Diff line change 3
3
xmlns : app =" http://schemas.android.com/apk/res-auto" >
4
4
5
5
<group
6
- android : id =" @+id/not_ready_to_create "
6
+ android : id =" @+id/not_ready_to_create_running_post "
7
7
android : visible =" false" >
8
8
<item
9
9
android : id =" @+id/warning_about_create_running_post_button"
14
14
</group >
15
15
16
16
<group
17
- android : id =" @+id/ready_to_create "
17
+ android : id =" @+id/ready_to_create_running_post "
18
18
android : visible =" false" >
19
19
<item
20
20
android : id =" @+id/create_running_post_button"
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <menu xmlns : android =" http://schemas.android.com/apk/res/android"
3
+ xmlns : app =" http://schemas.android.com/apk/res-auto" >
4
+
5
+ <item
6
+ android : id =" @+id/go_to_create_running_post"
7
+ android : enabled =" true"
8
+ android : icon =" @drawable/plus_button"
9
+ android : title =" @string/community_go_to_create_running_post"
10
+ app : showAsAction =" always" />
11
+
12
+ </menu >
Original file line number Diff line number Diff line change 3
3
xmlns : app =" http://schemas.android.com/apk/res-auto"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
5
android : id =" @+id/navigation_graph.xml"
6
- app : startDestination =" @id/selectRunningHistoryFragment " >
6
+ app : startDestination =" @id/runningStartFragment " >
7
7
8
8
<fragment
9
9
android : id =" @+id/myRunFragment"
Original file line number Diff line number Diff line change 27
27
<string name =" community_running_post_complete" >인증글 작성 완료</string >
28
28
<string name =" community_select_running_history" >운동 내역 선택 완료</string >
29
29
<string name =" community_select_running_history_snack_bar" >운동을 하나 선택해주세요!</string >
30
+ <string name =" community_go_to_create_running_post" >인증글 생성하러 가기</string >
30
31
31
32
<!-- 마이런 탭 화면 -->
32
33
<string name =" my_run_tool_bar_menu_setting" >설정</string >
You can’t perform that action at this time.
0 commit comments