-
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
[UI/#66] 여행 친구 조회 뷰 / UI 수정 #72
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
478ea29
[ADD/#66] 여행 친구들 조회 파일 추가
leeeyubin e12a0e4
[FEAT/#66] 취향 태그 String 추출 및 UI
leeeyubin ebbaaeb
[UI/#66] 여행 친구들 조회 UI
leeeyubin 5531ff6
[UI/#66] Scroll View 구현
leeeyubin 7cf0703
[FEAT/#66] 리스트 어댑터 구현
leeeyubin cd246bd
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
leeeyubin e3437ac
[FEAT/#66] 리스트 어댑터 구현
leeeyubin dd7cb04
[FEAT/#66] 리스트 어댑터 구현
leeeyubin 0cc8591
[FEAT/#66] 여행 친구 조회 로직 및 설정 UI 수정
leeeyubin 6327e7d
[UI/#66] 여행 친구 조회 UI
leeeyubin 2d15fd1
[MOD/#66] 코드 디테일 수정
leeeyubin fc7cd7f
[FIX/#66] 메니페스트 수정
leeeyubin 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
73 changes: 73 additions & 0 deletions
73
presentation/src/main/java/com/going/presentation/checkfriends/CheckFriendsActivity.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,73 @@ | ||
package com.going.presentation.checkfriends | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import androidx.activity.viewModels | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.ActivityCheckFriendsBinding | ||
import com.going.presentation.todo.ourtodo.OurTodoFriendAdapter | ||
import com.going.ui.base.BaseActivity | ||
import com.going.ui.extension.setOnSingleClickListener | ||
|
||
class CheckFriendsActivity : | ||
BaseActivity<ActivityCheckFriendsBinding>(R.layout.activity_check_friends) { | ||
|
||
private var _adapter: OurTodoFriendAdapter? = null | ||
private val adapter | ||
get() = requireNotNull(_adapter) { getString(R.string.adapter_not_initialized_error_msg) } | ||
|
||
private val viewModel by viewModels<CheckFriendsViewModel>() | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initBackClickListener() | ||
initAdapter() | ||
setProgressBarStatus() | ||
|
||
} | ||
|
||
private fun initBackClickListener() { | ||
binding.btnCheckFriendsBack.setOnSingleClickListener { | ||
finish() | ||
} | ||
} | ||
|
||
private fun initAdapter() { | ||
_adapter = OurTodoFriendAdapter() | ||
binding.rvCheckFriendsMember.adapter = adapter | ||
adapter.submitList(viewModel.mockParticipantsList) | ||
} | ||
|
||
private fun setProgressBarStatus() { | ||
// styleA의 평균 값이 1이라고 가정 | ||
binding.progressBarCheckFriends1.progress = 1 | ||
if (binding.progressBarCheckFriends1.progress <= 2) { | ||
// 평균 값이 0 ~2면 1 더하기 | ||
binding.progressBarCheckFriends1.progress = 1 + 1 | ||
binding.progressBarCheckFriends2.progress = 2 + 1 | ||
binding.progressBarCheckFriends3.progress = 0 + 1 | ||
} | ||
|
||
// styleD의 평균 값이 3이라고 가정 | ||
binding.progressBarCheckFriends4.progress = 3 | ||
if (binding.progressBarCheckFriends4.progress > 2) { | ||
// 프로그레스바 반대 방향으로 적용 | ||
binding.progressBarCheckFriends4.visibility = View.INVISIBLE | ||
binding.progressBarCheckFriends4Revert.visibility = View.VISIBLE | ||
|
||
binding.progressBarCheckFriends5.visibility = View.INVISIBLE | ||
binding.progressBarCheckFriends5Revert.visibility = View.VISIBLE | ||
|
||
// 평균 값이 4 ~5 라면 2 빼기 | ||
binding.progressBarCheckFriends4Revert.progress = 3 - 2 | ||
binding.progressBarCheckFriends5Revert.progress = 4 - 2 | ||
} | ||
} | ||
|
||
override fun onDestroy() { | ||
super.onDestroy() | ||
_adapter = null | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
presentation/src/main/java/com/going/presentation/checkfriends/CheckFriendsViewModel.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 com.going.presentation.checkfriends | ||
|
||
import androidx.lifecycle.ViewModel | ||
import com.going.domain.entity.response.TripParticipantsListModel | ||
|
||
class CheckFriendsViewModel : ViewModel() { | ||
|
||
val mockParticipantsList: List<TripParticipantsListModel.TripParticipantModel> = listOf( | ||
TripParticipantsListModel.TripParticipantModel(0, "일지민", 100), | ||
TripParticipantsListModel.TripParticipantModel(1, "이지민", 100), | ||
TripParticipantsListModel.TripParticipantModel(2, "삼지민", 100), | ||
TripParticipantsListModel.TripParticipantModel(3, "사지민", 100), | ||
TripParticipantsListModel.TripParticipantModel(4, "오지민", 100), | ||
TripParticipantsListModel.TripParticipantModel(5, "육지민", 100), | ||
) | ||
|
||
} |
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
23 changes: 23 additions & 0 deletions
23
presentation/src/main/java/com/going/presentation/todo/ourtodo/OurTodoDecoration.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,23 @@ | ||
package com.going.presentation.todo.ourtodo | ||
|
||
import android.content.Context | ||
import android.graphics.Rect | ||
import android.view.View | ||
import androidx.recyclerview.widget.RecyclerView | ||
|
||
class OurTodoDecoration(val context: Context) : RecyclerView.ItemDecoration() { | ||
|
||
override fun getItemOffsets( | ||
outRect: Rect, | ||
view: View, | ||
parent: RecyclerView, | ||
state: RecyclerView.State | ||
) { | ||
super.getItemOffsets(outRect, view, parent, state) | ||
val position = parent.getChildAdapterPosition(view) | ||
|
||
if (position == parent.adapter?.itemCount?.minus(1)) { | ||
outRect.right = 150 | ||
} | ||
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 데코레이션마저 자유자재 ㄷㄷ |
||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
presentation/src/main/res/drawable/layer_list_trip_friends_progress_bar.xml
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:id="@android:id/background"> | ||
<shape> | ||
<corners android:radius="4dp"/> | ||
<solid android:color="@color/gray_50"/> | ||
</shape> | ||
</item> | ||
|
||
<item android:id="@android:id/progress"> | ||
<scale android:scaleWidth="100%"> | ||
<shape> | ||
<corners android:radius="4dp"/> | ||
<solid android:color="@color/gray_400"/> | ||
</shape> | ||
</scale> | ||
</item> | ||
</layer-list> |
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
8 changes: 8 additions & 0 deletions
8
presentation/src/main/res/drawable/shape_rect_6_white000_fill_gray200_line.xml
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,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/white_000" /> | ||
<stroke android:width="1dp" /> | ||
<stroke android:color="@color/gray_200" /> | ||
<corners android:radius="6dp" /> | ||
</shape> |
Oops, something went wrong.
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.
지리네 유빈지노
이거를 해냈다~~~~~~~~~