-
Notifications
You must be signed in to change notification settings - Fork 49
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
[스캇] 1, 2단계 영화 극장 선택 제출합니다. #23
Merged
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
0991106
feat: merge
RightHennessy 79905b9
docs: 기능 목록 추가
RightHennessy 09116ef
feat: 바텀네비게이션 xml 구현
RightHennessy 5d01561
feat: 메인 엑티비티 초기 구현
RightHennessy af1fc7f
feat: setting fragment 기능 구현
RightHennessy a42ecc7
feat: MoviesFragment 구현
chws0508 9c2cc90
feat: reservation fragment xml 구현
chws0508 1de0306
feat: reservationList fragment 구현
chws0508 3434e71
feat: 바텀 네비게이션 동작 구현
chws0508 a0b5c81
feat: 예매 내역을 터치하면 예매 정보를 보여준다.
chws0508 9b23515
feat: 클릭 시 효과주기 구현
chws0508 48f3d2d
docs: step2 기능 목록 구현
chws0508 9983bf9
docs: 설정 화면 구현
chws0508 7189bf3
feat : 권한 요청 구현
chws0508 2416121
feat : 푸시 알림 정보 저장
chws0508 3700c4b
feat : 알림 기능 구현
chws0508 bd4343d
feat : 푸시 알림 on/off 적용
chws0508 a5d6aef
refactor: 함수 분리
RightHennessy 114d4e2
feat : 설정 화면 UI Test 구현
chws0508 d0c5c66
feat : NotificationHelper 로 분리
chws0508 93480e9
feat : Test 코드 패키지 일치
chws0508 a65f934
feat : 테스트명 한글로 수정
chws0508 eede551
feat : SettingPreferenceManager 오브젝트 구현
chws0508 a5705cb
feat : PushAlarmSwitch 클래스 구현
chws0508 70e6f0b
refactor : Fragment 는 switch 가 켜져있는지만 알 수 있도록 수정
chws0508 04cf373
refactor : Fragment Test 수정
chws0508 6bd969b
refactor : onViewCreated 에서 View 작업을 하도록 수정
chws0508 66bc737
refactor : Permission 요청 함수 분리 및, SettingPreferenceManager 오브젝트 패키지 이동
chws0508 d962bd5
refactor : 화면 회전시 기존 fragmet 유지
chws0508 b0e1f66
refactor : onCreateView 삭제
chws0508 267e92c
refactor : ReservationAlarmManager 구현
chws0508 e148872
refactor : NotificationReceiver 수정
chws0508 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat : PushAlarmSwitch 클래스 구현
- Loading branch information
commit a5705cb35dd78aea0eaaa985c642ac48063d981f
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
app/src/main/java/woowacourse/movie/view/PushAlarmSwitch.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,17 @@ | ||
package woowacourse.movie.view | ||
|
||
import android.content.Context | ||
import android.util.Log | ||
import android.widget.Switch | ||
import androidx.appcompat.widget.SwitchCompat | ||
import woowacourse.SettingPreferenceManager | ||
|
||
class PushAlarmSwitch(val view: Switch) { | ||
init { | ||
SettingPreferenceManager.inIt(view.context) | ||
view.isChecked = SettingPreferenceManager.getAlarmReceptionStatus() | ||
view.setOnClickListener { | ||
SettingPreferenceManager.changeAlarmReceptionStatus() | ||
} | ||
} | ||
} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
PushAlaramSwitch는 클래스로 분리된 장점이 없습니다.
단순히 private 함수로 존재할 내용이 클래스로 만들어진 차이만 가지고 있어요.
실제로 PushAlarmSwitch의 역할을 하는 것으로 기대한다면,
Switch를 상속받은 커스텀 뷰를 구현하는게 맞습니다.
다만 현재 미션에서의 요구사항은 아니기에 참고만 해 주시면 좋겠습니다.