-
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] 메인 지도 뷰 참여모달 구현 #30
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
556d13f
[feat] #29 ViewExt 추가 (stringOf, colorOf, drawableOf)
jihyunniiii 3b9baa3
[chore] #29 badge, chip에 확장함수 적용
jihyunniiii 256b29b
[add] #29 메인 지도 뷰 참여모달 구현을 위한 string 리소스 추가
jihyunniiii d87ad59
[add] #29 메인 지도 뷰 참여모달 구현을 위한 dimen 추가
jihyunniiii 11fbaaf
[feat] #29 메인 지도 뷰 다이얼로그 구현
jihyunniiii 23970ad
[chore] #29 BindingDialogFragment background 색상 변경
jihyunniiii 17a1759
[chore] #29 네이밍 수정 (map -> map_modal)
jihyunniiii 0f4c75d
[chore] #29 @+id -> @id
jihyunniiii 06194cb
Merge branch 'develop' into feat-main-map-modal
jihyunniiii 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
40 changes: 40 additions & 0 deletions
40
app/src/main/java/org/sopt/pingle/presentation/ui/main/home/map/MapModalDialogFragment.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,40 @@ | ||
package org.sopt.pingle.presentation.ui.main.home.map | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import org.sopt.pingle.R | ||
import org.sopt.pingle.databinding.DialogMapModalBinding | ||
import org.sopt.pingle.presentation.type.CategoryType | ||
import org.sopt.pingle.util.base.BindingDialogFragment | ||
import org.sopt.pingle.util.fragment.colorOf | ||
|
||
class MapModalDialogFragment( | ||
private val category: CategoryType, | ||
private val name: String, | ||
private val ownerName: String, | ||
private val clickBtn: () -> Unit | ||
) : BindingDialogFragment<DialogMapModalBinding>(R.layout.dialog_map_modal) { | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
initLayout() | ||
addListeners() | ||
} | ||
|
||
private fun initLayout() { | ||
with(binding) { | ||
badgeMapModalPingleInfoCategory.setBadgeCategoryType(category) | ||
tvMapModalPingleInfoName.text = name | ||
tvMapModalPingleInfoName.setTextColor(colorOf(category.textColor)) | ||
tvMapModalPingleInfoOwnerName.text = ownerName | ||
} | ||
} | ||
|
||
private fun addListeners() { | ||
binding.btnMapModal.setOnClickListener { | ||
clickBtn() | ||
dismiss() | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<data> | ||
|
||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="@dimen/dialog_horizontal_margin" | ||
android:background="@drawable/shape_border_radius_15" | ||
android:backgroundTint="@color/g_10" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_start" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_begin="@dimen/dialog_map_modal_horizontal_margin" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_end" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_end="@dimen/dialog_map_modal_horizontal_margin" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/layout_map_modal_pingle_info" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="25dp" | ||
android:background="@drawable/shape_border_radius_15" | ||
android:backgroundTint="@color/g_09" | ||
app:layout_constraintEnd_toEndOf="@id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_start" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_map_modal_pingle_info_start" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_begin="16dp" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_map_modal_pingle_info_end" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_end="16dp" /> | ||
|
||
<org.sopt.pingle.util.component.PingleBadge | ||
android:id="@+id/badge_map_modal_pingle_info_category" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing25" | ||
app:layout_constraintEnd_toEndOf="@id/gl_map_modal_pingle_info_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_map_modal_pingle_info_start" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:text="STUDY" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_map_modal_pingle_info_name" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="6dp" | ||
android:gravity="center" | ||
android:textAppearance="@style/TextAppearance.Pingle.Sub.Semi.18" | ||
app:layout_constraintEnd_toEndOf="@id/gl_map_modal_pingle_info_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_map_modal_pingle_info_start" | ||
app:layout_constraintTop_toBottomOf="@id/badge_map_modal_pingle_info_category" | ||
tools:text="강남 모각작팟" | ||
tools:textColor="@color/pingle_orange" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_map_modal_pingle_info_owner_name" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="6dp" | ||
android:layout_marginBottom="25dp" | ||
android:textAppearance="@style/TextAppearance.Pingle.Body.Med.14" | ||
android:textColor="@color/g_03" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="@id/gl_map_modal_pingle_info_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_map_modal_pingle_info_start" | ||
app:layout_constraintTop_toBottomOf="@id/tv_map_modal_pingle_info_name" | ||
tools:text="박소현" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
<TextView | ||
android:id="@+id/tv_map_modal_description" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="20dp" | ||
android:text="@string/map_modal_description" | ||
android:textAppearance="@style/TextAppearance.Pingle.Body.Med.14" | ||
android:textColor="@color/white" | ||
app:layout_constraintEnd_toStartOf="@id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_start" | ||
app:layout_constraintTop_toBottomOf="@id/layout_map_modal_pingle_info" /> | ||
|
||
<com.google.android.material.button.MaterialButton | ||
android:id="@+id/btn_map_modal" | ||
style="@style/Theme.Pingle.Button.M" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="45dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginBottom="21dp" | ||
android:backgroundTint="@color/g_01" | ||
android:text="@string/map_participate" | ||
android:textColor="@color/g_10" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toStartOf="@id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_start" | ||
app:layout_constraintTop_toBottomOf="@id/tv_map_modal_description" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
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
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.
이렇게 나누는게 재사용성이 더 좋을 것 같아요!!!
굳굳굳