-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add toolbar & bottom navigation bar #71
Conversation
… TimelineFragment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마이너한 사항들이라 어프로브는 미리 드립니다!
확인해 주시고 필요하다고 생각하시는 부분만 반영하고 바로 머지하셔도 됩니다 !
고생하셨어요 :)
@@ -15,6 +23,8 @@ class MainActivity : AppCompatActivity() { | |||
ActivityMainBinding.inflate(layoutInflater) | |||
} | |||
|
|||
private var lastSelectedIconId: Int = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- id가 0으로 하는 이유는 타임라인을 먼저 띄우는 용도인가요?
그렇다면 val homeId = 0
라던지, home, search 등등 각각 구조체로 묶고, 대입하는 것은 어떨까요?
- (1)이 아니라면 0은 id가 겹칠 확률이 없나요? index 같은건 0이라서요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
lastSelectedIconId
는 현재 선택된 아이콘의 id를 저장하는 변수입니다. 처음 앱이 실행될 때는 어떠한 아이콘도 선택되지 않은 상태입니다. 단순히 초기상태를 나타내기 위한 값이고 초기화되지 않았을 때 기본값이 0이라서 0으로 사용했습니다…! 구조체로 묶을 수도 있지만 단순히 마지막으로 선택된 아이콘의 id를 저장하는 역할이기때문에 굳이 안해도 되지 않을까 싶습니다..? -
현재 사용되고있는 icon의 id값이 서로 다르기 때문에 큰 문제는 없을 것 같습니다..!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다 :)
item.setIcon(selectedIcon) | ||
|
||
// 이전에 선택된 아이콘 원래 아이콘으로 변경 | ||
if (lastSelectedIconId != 0 && lastSelectedIconId != currentIconId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위에 사항을 바꾸게 되면 0 조건도 바꿀 수 있을 것 같아요 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bcf8bc4 최대한 매직넘버를 자제하기위해서 lastSelectedIconId
를 nullable
로 선언하고 초기값을 null
로 설정해서 보다 직관적으로 이해할 수 있게 바꿔보았습니당
Handler(Looper.getMainLooper()).postDelayed({ | ||
doubleBackPressed = false | ||
}, 2000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
디테일 너무 좋습니다 💯 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
두 번 터치 시 종료되는 액션은 추후 반영해보겠습니다....🥹
} | ||
false | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
별건 아닌데 개행이 빠진 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정 완료했습니다~
if (keyCode == KeyEvent.KEYCODE_BACK) { | ||
if (isCurrentFragment()) { | ||
// 현재 프래그먼트에서 뒤로가기 버튼 처리 | ||
if (doubleBackPressed) { | ||
// 두 번째 눌림 | ||
requireActivity().finish() | ||
} else { | ||
// 첫 번째 눌림 | ||
doubleBackPressed = true | ||
// 2초 내에 두 번 누르지 않으면 초기화 | ||
Handler(Looper.getMainLooper()).postDelayed({ | ||
doubleBackPressed = false | ||
}, 2000) | ||
} | ||
return@setOnKeyListener true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요기 아까 봤던 코드 같은데 공통 부분 뺄 수는 없을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
81a4f89 Utils.kt
에 따로 빼서 함수로 정의해보았는데 적용 시 뒤로가기 액션은 정상적으로 제거가 되었지만 종료 액션이 먹히지 않는 문제가 생겨서 추후에 다시 검토해보고 반영해보겠습니다..!
리뷰 반영 완료했습니다!! |
고생하셨습니다 🔥 🔥 |
* feat: add start & login fragment for android (#26) * feat: setting android development environment * feat: setting navigation graph * feat: setting ktlint * feat: setting ktlint * feat: setting ktlint * chore: test eol at new file * chore: add eol to files * chore: add eol to gitignore * chore: add colorList * chore: add font_resource & font_style xml * chore: add font style themes * chore: edit theme colors * chore: edit font style themes * feat: add startFragment & edit MainActivity, nav_graph * feat: add lottieAnimation in Gradle & startFragment * feat: edit lottieAnimation size * chore: add icons * feat: add loginFragment & strings * feat: add nagivation start to login & loginFragment ui xml * feat: add String and edit login & loginFragment ui xml * feat: add nagivation login to password & PasswordFragment ui xml * chore: edit letterspacing in themes.xml * chore: review apply * chore: edit home icon * feat: add find account Fragment & edit font system in themes (#35) * chore: add green check icon * feat: add FindAccountFragment * feat: edit FindAccountFrangmet for basic setting * feat: add FindAccountFragment String * feat: add navigation action in loginFragment & PasswordFragment * chore: edit font system in themes * chore: edit textStyle in fragment_password * feat: add CheckIdFragment * feat: delete checkidFragment & edit FindAccountFragment btn ui & add underline for passwordFragment string * feat: edit id name in login/findAccount Fragment * feat: edit headline weight in fragments * chore: edit textStyle & delete view in startFragment * feat: finish login & join View components (#58) * feat: add createAccountFragment * feat: add string for createAccountFragment * feat: edit xml for CreateAccountFragment Ui * feat: add navigation Action for createAccountFragment * feat: add action for check icon in CreateAccountFragment * feat: edit string for CreatAccountFragment * chore: add icons for password/profile * feat: edit textcolor for announcement & add toast message * feat: add SendCodeFragment * feat: add strings for SendCodeFragment * feat: add navigation Action for SendCodeFragment * feat: edit xml & fragment code for SendCodeFragment * feat: edit string to remove phoneNum & add email/Number Keypad for editText * feat: add NeedPasswordFragment * feat: add strings for NeedPasswordFragment * feat: edit xml & fragment code for NeedPasswordFragment * feat: add navigation Action for NeedPasswordFragment * feat: edit directory structure for viewmodel(MVVM) & add JoinViewModel * feat: add ProfileImageFragment * feat: add string for ProfileImageFragment * feat: edit xml & fragment code for ProfileImageFragment * feat: add navigation Action for ProfileImageFragment * feat: add Fragment & string for AskNameFragment * feat: edit xml & fragment code for AskNameFragment * feat: add navigation Action for AskNameFragment * feat: remove skip btn in AskNameFragment * feat: edit JoinViewModel for send livedata fragment to fragment * feat: edit NeedPasswordFragment to Setting icon action for password inputType On/Off * feat: edit profileImageFragment to link icon to Gallery * feat: forbid keybord action(space, enter) * feat: edit PasswordFragment to Setting icon action for password inputType On/Off * feat: add viewmodel for login View * feat: add button activation for all fragments * feat: change lottie animation * feat: remove underline in EditText * feat: add hint animation in join View * feat: add hint animation in login View * feat: add validate check for NeedPasswordFragment & add Toast for sendEmail * feat: add validate check for CreateAccountFragment * feat: edit ImageView to CardView * feat: add Image delete btn & logic in ProfileImageFragment * feat: add keypad dependency in buttons * feat: edit viewmodel to bundle in login->password logic * feat: edit FindAccountFragment to remove underline in editText * feat: remove log * chore: reflect review * feat: edit eol * feat: add toolbar & bottom navigation bar (#71) * feat: add toolbar & navigation bar basic setting * feat: change constraintLayout into LinearLayout to pix location & add TimelineFragment * feat: edit toolbar navigate icon & actions for login/join Views * feat: setting basic things for timelineFragment * feat: add toolbar icon in TimelineFragment * feat: create Fragments for add bottom navigation bar * feat: edit activity_main.xml for toolbar/navbar/fragmentContainer view problem * feat: edit margin in loginFragment * edit bottom_nav * feat: chained fragmentContainerView in activityMain * feat: edit toolbar & bottom navigationbar * feat: delete sucks itemActiceIndicator * feat: clear doubleClicked icon focus issue * chore: add eol * chore: reflect review * chore: reflect review * chore: reflect review * feat: add RecyclerView & TabLayout in TineLine Fragment (#78) * chore: edit nav_bar visibility for easy dev * feat: add profile icon for toolbar * feat: add action for profile icon to navigate ProfileFragment * feat: add adapter for TimelineFragment & add Tablayout/ViewPager * feat: add ForToyFragment/TimeLineFragment & edit toolbar bg/indicator color * feat: add item_timeline for timeline RecyclerView * feat: edit item_timeline for timeline RecyclerView * feat: edit TimeLineItem dataclass for nullable components * feat: add recyclerView in FollowingFragment * feat: edit profileImg to nullable & remove touch animation in bottombar * feat: add scroll action save logic in RV * feat: add json file & edit icon size * chore: add icons for post menu * feat: edit TimelineRVAdapter
* feat: add start & login fragment for android (#26) * feat: setting android development environment * feat: setting navigation graph * feat: setting ktlint * feat: setting ktlint * feat: setting ktlint * chore: test eol at new file * chore: add eol to files * chore: add eol to gitignore * chore: add colorList * chore: add font_resource & font_style xml * chore: add font style themes * chore: edit theme colors * chore: edit font style themes * feat: add startFragment & edit MainActivity, nav_graph * feat: add lottieAnimation in Gradle & startFragment * feat: edit lottieAnimation size * chore: add icons * feat: add loginFragment & strings * feat: add nagivation start to login & loginFragment ui xml * feat: add String and edit login & loginFragment ui xml * feat: add nagivation login to password & PasswordFragment ui xml * chore: edit letterspacing in themes.xml * chore: review apply * chore: edit home icon * feat: add find account Fragment & edit font system in themes (#35) * chore: add green check icon * feat: add FindAccountFragment * feat: edit FindAccountFrangmet for basic setting * feat: add FindAccountFragment String * feat: add navigation action in loginFragment & PasswordFragment * chore: edit font system in themes * chore: edit textStyle in fragment_password * feat: add CheckIdFragment * feat: delete checkidFragment & edit FindAccountFragment btn ui & add underline for passwordFragment string * feat: edit id name in login/findAccount Fragment * feat: edit headline weight in fragments * chore: edit textStyle & delete view in startFragment * feat: finish login & join View components (#58) * feat: add createAccountFragment * feat: add string for createAccountFragment * feat: edit xml for CreateAccountFragment Ui * feat: add navigation Action for createAccountFragment * feat: add action for check icon in CreateAccountFragment * feat: edit string for CreatAccountFragment * chore: add icons for password/profile * feat: edit textcolor for announcement & add toast message * feat: add SendCodeFragment * feat: add strings for SendCodeFragment * feat: add navigation Action for SendCodeFragment * feat: edit xml & fragment code for SendCodeFragment * feat: edit string to remove phoneNum & add email/Number Keypad for editText * feat: add NeedPasswordFragment * feat: add strings for NeedPasswordFragment * feat: edit xml & fragment code for NeedPasswordFragment * feat: add navigation Action for NeedPasswordFragment * feat: edit directory structure for viewmodel(MVVM) & add JoinViewModel * feat: add ProfileImageFragment * feat: add string for ProfileImageFragment * feat: edit xml & fragment code for ProfileImageFragment * feat: add navigation Action for ProfileImageFragment * feat: add Fragment & string for AskNameFragment * feat: edit xml & fragment code for AskNameFragment * feat: add navigation Action for AskNameFragment * feat: remove skip btn in AskNameFragment * feat: edit JoinViewModel for send livedata fragment to fragment * feat: edit NeedPasswordFragment to Setting icon action for password inputType On/Off * feat: edit profileImageFragment to link icon to Gallery * feat: forbid keybord action(space, enter) * feat: edit PasswordFragment to Setting icon action for password inputType On/Off * feat: add viewmodel for login View * feat: add button activation for all fragments * feat: change lottie animation * feat: remove underline in EditText * feat: add hint animation in join View * feat: add hint animation in login View * feat: add validate check for NeedPasswordFragment & add Toast for sendEmail * feat: add validate check for CreateAccountFragment * feat: edit ImageView to CardView * feat: add Image delete btn & logic in ProfileImageFragment * feat: add keypad dependency in buttons * feat: edit viewmodel to bundle in login->password logic * feat: edit FindAccountFragment to remove underline in editText * feat: remove log * chore: reflect review * feat: edit eol * feat: add toolbar & bottom navigation bar (#71) * feat: add toolbar & navigation bar basic setting * feat: change constraintLayout into LinearLayout to pix location & add TimelineFragment * feat: edit toolbar navigate icon & actions for login/join Views * feat: setting basic things for timelineFragment * feat: add toolbar icon in TimelineFragment * feat: create Fragments for add bottom navigation bar * feat: edit activity_main.xml for toolbar/navbar/fragmentContainer view problem * feat: edit margin in loginFragment * edit bottom_nav * feat: chained fragmentContainerView in activityMain * feat: edit toolbar & bottom navigationbar * feat: delete sucks itemActiceIndicator * feat: clear doubleClicked icon focus issue * chore: add eol * chore: reflect review * chore: reflect review * chore: reflect review * feat: add RecyclerView & TabLayout in TineLine Fragment (#78) * chore: edit nav_bar visibility for easy dev * feat: add profile icon for toolbar * feat: add action for profile icon to navigate ProfileFragment * feat: add adapter for TimelineFragment & add Tablayout/ViewPager * feat: add ForToyFragment/TimeLineFragment & edit toolbar bg/indicator color * feat: add item_timeline for timeline RecyclerView * feat: edit item_timeline for timeline RecyclerView * feat: edit TimeLineItem dataclass for nullable components * feat: add recyclerView in FollowingFragment * feat: edit profileImg to nullable & remove touch animation in bottombar * feat: add scroll action save logic in RV * feat: add json file & edit icon size * chore: add icons for post menu * feat: edit TimelineRVAdapter * feat: add bottomSheetDialog & Menu & FAB (#114) * feat:add bottomSheetDialog for Timeline * feat:add bottomSheetDialog xml for Timeline * feat: add behavior navigationBar & edit bottomsheet * feat: add fab btn & animation in timeline Fragment * feat: add fab btn & animation in timeline Fragment * fix: edit Viewpager overFlow * fix:remove bottomSheetDialog * feat: edit fab margin in constraintlayout * feat: add dummy data for Timeline * feat: add fab in navigation Fragment * feat: edit fab in messageFragment * feat: add vibrate for longClick * feat: add icons for popupmenu & add basic popupMenu * feat: add custom popup menu xml * feat: add custom popup into TimeLineRVAdapter * feat: edit custom popup tv * feat: add bottomSheetDialog * chore: rename Timeline package to timeline * feat: add post Fragment * feat: add navigation actions to post Fragment * feat: add actions for fab to PostFragment * fix: fix navigation actions to post Fragment * feat: add xml for ProfileFragment * feat: add action in MypageFragment(before ProfileFragment) * feat: add toggle action in MypageFragment * feat: add lightMode icon & Toast * feat: try to add animation in MyPageFragment * feat: add overlay view in TimelineFragment * feat:divide bottomSheetDialog into Rt & share * feat: add Toast into MyPageFragment * feat: add ViewBottomSheetDialog * feat: edit button to android.widget.button * chore: add eol * chore: reflect review * chore:reflect review * feat: add ic_up_arrow * chore:reflect review * feat: fix FAB animation bug * chore:reflect review * feat: remove elevation in bottomSheet btn * feat: add ProfileFragment & BookMarkFragment (#121) * feat: add profileFragment.xml before tablayout * feat: add viewPager & TabLayout in ProfileFragment * feat: add RV in MyPostFragment & edit doublePressed Logic in ForYou/Following Fragment * feat: add RV in ReplyFragment * feat: add RV in LikedFragment * feat: add RV in MediaFragment * feat: add RV in HighlightFragment * feat: change scrollview into NestedScrollView * feat: try to change statusBar Transperent * feat: add naviation for ProfileFragment & ViewPager * feat: Edit HighlighFragment to subscribe xml * feat: add FAB in ProfileFragment * feat: edit toobal & navBar visibility * feat: add BookMarkFragment & nav Actions * feat: add RV & toolbar Visibility for BookMarkFragment * feat: add layout for when bookMark is empty * feat: edit navigation in MyPageFragment * chore: add icon * chore: add eol * feat: add scroll action in ProfileFragment (#158) * chore: remove unused behavior.kt * feat: add SwipeRefresh in Timeline * feat: try to forbid basicBackbtn in ProfileFragment * feat: add nestedScrollableHost/icon & edit color theme name * chore: add Timber in Dependency & MainActivity * feat: remove scrollView in RV * feat: remove scrollView in RV * feat: remove scrollView in RV * feat: divide ConstraintLayout into 2 * feat: edit xml for scrollView * feat: add action in backbtn for ProfileFragment * feat: add SwipeRefresh in xml * feat: add swipe action in Tablayout * extract Method for RV in ProfileFragment * feat: try to add Highlight RV for ProfileFragment Tablayout * feat: make FAB cannot scroll * chore:add eol * feat: edit popupMenu constraintLayout * chore: add eol * chore: reflect review * chore: reflect review * chore: reflect review * chore: reflect review * chore: reflect review * chore: add eol * chore: add eol * feat: add PostFragment (#234) * feat: remove toolbar&navigation in PostFragment * feat: edit fragment_post.xml * feat: edit post_fragment.xml * feat: add textWatcher action & photo plus btn in PostFragment * feat: add CircularProgressBar * feat: add CircularProgressBar * fix: edit constraintLayout for editText space * fix: add img RV in PostFragment * fix: add horizontalScrollView * feat: link Gallery to PostFragment RV with Glide * feat: add border & cardView in Item_post_img * feat: add action for backbtn in PostFragment * chore:edit opacity for popup menu * feat: load Img from gallery to PostFragment * feat: change view's ConstraintLayout in PostFragment * feat: change enable btn in postFragment * feat: change deleteBtn translationZ * fix: fix upload sequence error * feat: add setOnClickListener in Horizontal RV * feat: change enable btn in postFragment * feat: change enable btn when add img in postFragment * chore:reflect review * chore:reflect review * chore:reflect review * chore:reflect review * feat: add quote & detail fragment (#279) * feat: add quote text & image ver * feat: add MultiView(quote text & image) in RV * feat: edit MultiView(quote text & image) margin & border in RV * feat: set Visibility for MultiView(quote text & image) in RV * feat: add margin for MultiView(quote text & image) in RV * feat: add postDetailFragment * feat: add item_post_detail.xml * feat: edit item_post_detail.xml * feat: add api for login&join (#292) * feat:add api(users/verify-email, users/temporary-join) * feat:add api(auth) * feat:add api(user/join) except profileImg * feat:add api(auth/mobile) & tokenManager * feat:add api(users/me)
Related Issue
#25
Changes
작업 사항
toolbar
기본설정navigation
기본 설정ActiveIndicateStyle
속성 수정..휴..)bottomNavigationbar
와fragment
연동OnPressedCallBack()
액션 수정** 뒤로가기 두 번 눌렀을때 종료되기(현재 한 번 누르면 여유두고 종료됨) **
** scroll과 하단 바텀바 연동,
timelineFragment
작업전까지 성공여부 알 수 없음(scroll 없음) **timelineFragment
) icon fill 처리수정 사항
theme.xml
의headline8 lineheight = 20dp
로 수정Screenshots
To Reviewer
작업사항에 명시된 내용은 작업하면서 차차 수정하겠습니당,,ㅎㅎ,,,
Checklist