-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CHORE] : git test #5
Open
oxix97
wants to merge
6
commits into
main
Choose a base branch
from
week7
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
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
There are no files selected for viewing
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 |
---|---|---|
@@ -1,98 +1,80 @@ | ||
# week3 | ||
# week7 | ||
|
||
![](../../../../../../Downloads/ezgif.com-gif-maker.gif) | ||
--- | ||
|
||
## level1 | ||
### GIF | ||
|
||
--- | ||
|
||
### 로그인 화면 | ||
|
||
#### SignInActivity | ||
### level 1-1 | ||
|
||
- editText, Button selector 적용한 모습 | ||
![ezgif com-gif-maker (1)](https://user-images.githubusercontent.com/72330632/146235660-57d12c96-fa3e-4853-8f8a-5f88aa316f35.gif) | ||
|
||
![img.png](img.png) | ||
|
||
- editText | ||
NavigationComponent를 활용하여 다음과 같이 구현했습니다. | ||
|
||
~~~xml | ||
<img width="694" alt="스크린샷 2021-12-10 오후 8 54 53" src="https://user-images.githubusercontent.com/72330632/145570481-64080401-d4f5-40e6-8265-91cca00d0dfa.png"> | ||
|
||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:state_focused="true" | ||
android:drawable="@drawable/edit_text_true"/> | ||
<item android:drawable="@drawable/edit_text_false"/> | ||
</selector> | ||
~~~ | ||
마지막 fragment 에 시작하기 버튼을 누르면 finish()이후 Intent을 사용하여 SignInActivity로 이동합니다. | ||
|
||
~~~xml | ||
```kotlin | ||
private fun initIntent() { | ||
binding.btnNext.setOnClickListener { | ||
requireActivity().finish() | ||
startActivity(Intent(requireActivity(), SignInActivity::class.java)) | ||
} | ||
} | ||
``` | ||
|
||
<item android:color="@color/week3_pink" android:state_checked="true"/> | ||
<item android:color="@color/week3_gray" android:state_checked="false"/> | ||
~~~ | ||
### level 1-2 | ||
|
||
- Button | ||
![ezgif com-gif-maker (2)](https://user-images.githubusercontent.com/72330632/146236742-9f5805b8-a28e-4e39-a91c-60e4ea8e4fe3.gif) | ||
|
||
~~~xml | ||
|
||
<shape | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<corners android:radius="5dp"/> | ||
<solid android:color="@color/week3_pink"/> | ||
</shape> | ||
~~~ | ||
remove()를 사용하여 자동로그인 해제 한 다음 apply()로 적용한 모습입니다. | ||
|
||
--- | ||
```kotlin | ||
fun setLogout(context: Context) { | ||
val preferences = context.getSharedPreferences(USER_AUTH, Context.MODE_PRIVATE) | ||
preferences.edit() | ||
.remove(AUTO_LOGIN) | ||
.apply() | ||
} | ||
``` | ||
|
||
#### SignUpActivity | ||
### level 1-3 | ||
|
||
- 회원 가입 화면도 동일하게 적용 | ||
<img width="166" alt="스크린샷 2021-12-15 오후 11 13 53" src="https://user-images.githubusercontent.com/72330632/146202311-da2f3d7b-0918-462d-aabb-b6cd8f7b558b.png"> | ||
|
||
![img_1.png](img_1.png) | ||
- adapter : 공용으로 사용될 adapter 정의 (현재는 adapter 와 관련된 모든 클래스를 넣어놓고는 있다....) | ||
- data : data 클래스 등등 | ||
- util : Util과 같은 클래스가 있다. -> Util 클래스로 만든 이유는 자주사용하는 코드, 공용으로 사용해야 할 코드를 Util로 묶어두면 유용하기 때문에 만들었습니다. | ||
- view : view 폴더 안에 activity, fragment, adapter 등으로 나뉘어 한눈에 보기 쉽다. (현재는 fragment, activity 로만 나뉨 ) | ||
|
||
--- | ||
해당 방식으로 패키징한 이유는 봤을 때 직관적으로 어느 패키지에 뭐가 있는지 알 수 있다는 장점이 있으며 , 검색을 해보니 MVP, MVVM 을 적용해 보면서 | ||
만들어진 구조라고 한다. | ||
|
||
#### HomeActivity | ||
|
||
![img_2.png](img_2.png) | ||
![img_3.png](img_3.png) | ||
- BottomNavigationView에 selector 적용 | ||
|
||
~~~xml | ||
|
||
<com.google.android.material.bottomnavigation.BottomNavigationView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:menu="@menu/menu" | ||
app:itemTextColor="@color/color" | ||
app:itemRippleColor="#FFBEBE" | ||
app:itemIconTint="@color/color" | ||
android:id="@+id/bnv_sample" | ||
/> | ||
~~~ | ||
|
||
- Button selector 적용 | ||
~~~xml | ||
|
||
<androidx.appcompat.widget.AppCompatButton | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/bt_repository" | ||
android:textColor="@color/profile_button_text" | ||
android:background="@drawable/profile_button" | ||
tools:textColor="@color/profile_button_text" | ||
tools:background="@color/profile_button" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/bt_follower" | ||
app:layout_constraintTop_toBottomOf="@+id/layout_profile" | ||
android:layout_margin="12dp" | ||
android:text="repository" | ||
/> | ||
~~~ | ||
[comment]: <> (### level 2-1) | ||
|
||
--- | ||
[comment]: <> (- gif 2-1) | ||
|
||
[comment]: <> (- popUpTo : destination이 나올 때 까지 백스택을 팝업한다.) | ||
|
||
[comment]: <> (- popUpInclusive : 지정되지 않거나 false 값인 경우 지정된 destination 경로는 백스택에 저장되어있고 나머지 도착점들을 모두 제거한다. ) | ||
|
||
[comment]: <> (true 값인 경우 지정된 경로를 포함하여 제거한다.) | ||
|
||
[comment]: <> (- popUpInclusive 값이 true 이고, popUpTo 값이 시작점인 경우 백 버튼을 누르면 앱이 종료된다.) | ||
|
||
|
||
[comment]: <> (### level 2-2) | ||
|
||
[comment]: <> (- gif 2-2) | ||
|
||
### 배운 점 | ||
|
||
- Navigation Component 사용법 | ||
- SharedPreference remove, clear 사용법 | ||
- 안드로이드 패키징 해야하는 이유 | ||
- popUpTo, popUpInclusive 사용법 | ||
- Toolbar, Appbar 사용법 |
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
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
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
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
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
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
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.
이 리뷰 확인해보면 좋을 것 같습니다!
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.
좋은 자료 감사합니다~~~