Skip to content

Commit

Permalink
Merge pull request #87 from TeamPINGLE/feat-map-asset-writing
Browse files Browse the repository at this point in the history
[feat] 에셋 추가 및 수정사항 반영 - 지현
  • Loading branch information
jihyunniiii authored Jan 9, 2024
2 parents 047a5d0 + f4ec9e3 commit a2671b6
Show file tree
Hide file tree
Showing 33 changed files with 420 additions and 165 deletions.
7 changes: 6 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
android:scheme="kakao${KAKAO_NATIVE_APP_KEY}" />
</intent-filter>
</activity>

<activity
android:name=".presentation.ui.auth.AuthActivity"
android:exported="false"
Expand Down Expand Up @@ -90,6 +89,11 @@
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustNothing"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".presentation.ui.participant.ParticipantActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<meta-data
android:name="io.sentry.dsn"
Expand All @@ -110,4 +114,5 @@
android:name="io.sentry.traces.profiling.sample-rate"
android:value="1.0" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import org.sopt.pingle.presentation.ui.main.home.map.MapFragment

fun CategoryType.toMarkerIcon(isSelected: Boolean) =
when (this) {
CategoryType.PLAY -> if (isSelected) MapFragment.OVERLAY_IMAGE_PLAY_BIG else MapFragment.OVERLAY_IMAGE_PLAY_SMALL
CategoryType.STUDY -> if (isSelected) MapFragment.OVERLAY_IMAGE_STUDY_BIG else MapFragment.OVERLAY_IMAGE_STUDY_SMALL
CategoryType.MULTI -> if (isSelected) MapFragment.OVERLAY_IMAGE_MULTI_BIG else MapFragment.OVERLAY_IMAGE_MULTI_SMALL
CategoryType.OTHERS -> if (isSelected) MapFragment.OVERLAY_IMAGE_OTHER_BIG else MapFragment.OVERLAY_IMAGE_OTHER_SMALL
CategoryType.PLAY -> if (isSelected) MapFragment.OVERLAY_IMAGE_PIN_PLAY_ACTIVE else MapFragment.OVERLAY_IMAGE_PIN_PLAY_DEFAULT
CategoryType.STUDY -> if (isSelected) MapFragment.OVERLAY_IMAGE_PIN_STUDY_ACTIVE else MapFragment.OVERLAY_IMAGE_PIN_STUDY_DEFAULT
CategoryType.MULTI -> if (isSelected) MapFragment.OVERLAY_IMAGE_PIN_MULTI_ACTIVE else MapFragment.OVERLAY_IMAGE_PIN_MULTI_DEFAULT
CategoryType.OTHERS -> if (isSelected) MapFragment.OVERLAY_IMAGE_PIN_OTHERS_ACTIVE else MapFragment.OVERLAY_IMAGE_PIN_OTHERS_DEFAULT
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class MapFragment : BindingFragment<FragmentMapBinding>(R.layout.fragment_map),

locationOverlay.apply {
isVisible = true
icon = OverlayImage.fromResource(R.drawable.ic_map_location_overlay)
icon = OverlayImage.fromResource(R.drawable.ic_map_location_overlay_20)
}
}
} else {
Expand Down Expand Up @@ -243,17 +243,17 @@ class MapFragment : BindingFragment<FragmentMapBinding>(R.layout.fragment_map),
private const val MAP_CANCEL_MODAL = "mapCancelModal"
private const val MAP_MODAL = "mapModal"

val OVERLAY_IMAGE_PLAY_SMALL =
OverlayImage.fromResource(R.drawable.ic_map_marker_play_small)
val OVERLAY_IMAGE_STUDY_SMALL =
OverlayImage.fromResource(R.drawable.ic_map_marker_study_small)
val OVERLAY_IMAGE_MULTI_SMALL =
OverlayImage.fromResource(R.drawable.ic_map_marker_multi_small)
val OVERLAY_IMAGE_OTHER_SMALL =
OverlayImage.fromResource(R.drawable.ic_map_marker_other_small)
val OVERLAY_IMAGE_PLAY_BIG = OverlayImage.fromResource(R.drawable.ic_map_marker_play_big)
val OVERLAY_IMAGE_STUDY_BIG = OverlayImage.fromResource(R.drawable.ic_map_marker_study_big)
val OVERLAY_IMAGE_MULTI_BIG = OverlayImage.fromResource(R.drawable.ic_map_marker_multi_big)
val OVERLAY_IMAGE_OTHER_BIG = OverlayImage.fromResource(R.drawable.ic_map_marker_other_big)
val OVERLAY_IMAGE_PIN_PLAY_DEFAULT =
OverlayImage.fromResource(R.drawable.ic_pin_play_default)
val OVERLAY_IMAGE_PIN_STUDY_DEFAULT =
OverlayImage.fromResource(R.drawable.ic_pin_study_default)
val OVERLAY_IMAGE_PIN_MULTI_DEFAULT =
OverlayImage.fromResource(R.drawable.ic_pin_multi_default)
val OVERLAY_IMAGE_PIN_OTHERS_DEFAULT =
OverlayImage.fromResource(R.drawable.ic_pin_others_default)
val OVERLAY_IMAGE_PIN_PLAY_ACTIVE = OverlayImage.fromResource(R.drawable.ic_pin_play_active)
val OVERLAY_IMAGE_PIN_STUDY_ACTIVE = OverlayImage.fromResource(R.drawable.ic_pin_study_active)
val OVERLAY_IMAGE_PIN_MULTI_ACTIVE = OverlayImage.fromResource(R.drawable.ic_pin_multi_active)
val OVERLAY_IMAGE_PIN_OTHERS_ACTIVE = OverlayImage.fromResource(R.drawable.ic_pin_others_active)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.sopt.pingle.presentation.ui.participant

import android.os.Bundle
import org.sopt.pingle.R
import org.sopt.pingle.databinding.ActivityParticipantBinding
import org.sopt.pingle.util.base.BindingActivity

class ParticipantActivity :
BindingActivity<ActivityParticipantBinding>(R.layout.activity_participant) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
}
69 changes: 22 additions & 47 deletions app/src/main/java/org/sopt/pingle/util/component/PingleCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package org.sopt.pingle.util.component

import android.annotation.SuppressLint
import android.content.Context
import android.text.Spannable
import android.text.SpannableString
import android.text.style.ForegroundColorSpan
import android.text.style.TextAppearanceSpan
import android.content.Intent
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import java.time.LocalDate
import java.time.LocalTime
Expand All @@ -16,6 +14,7 @@ import org.sopt.pingle.R
import org.sopt.pingle.databinding.CardPingleBinding
import org.sopt.pingle.domain.model.PingleEntity
import org.sopt.pingle.presentation.type.CategoryType
import org.sopt.pingle.presentation.ui.participant.ParticipantActivity
import org.sopt.pingle.util.view.colorOf
import org.sopt.pingle.util.view.stringOf

Expand All @@ -42,6 +41,12 @@ class PingleCard @JvmOverloads constructor(
binding.btnCardBottomMapParticipate.setOnClickListener {
listener?.onPingleCardParticipateBtnClickListener()
}

binding.layoutCardTopParticipationStatus.setOnClickListener {
Intent(context, ParticipantActivity::class.java).apply {
context.startActivity(this)
}
}
}

fun initLayout(pingleEntity: PingleEntity) {
Expand All @@ -63,53 +68,23 @@ class PingleCard @JvmOverloads constructor(
pingleEntity.isParticipating || !pingleEntity.isCompleted()

if (pingleEntity.isCompleted()) {
with(tvCardTopInfoParticipantDetail) {
text = stringOf(R.string.map_card_completed)
setTextAppearance(R.style.TextAppearance_Pingle_Sub_Semi_16)
}
tvCardTopInfoParticipationStatusSlash.visibility = View.INVISIBLE
tvCardTopInfoParticipationStatusCurrentParticipants.visibility = View.INVISIBLE
tvCardTopInfoParticipationStatusMaxParticipants.visibility = View.INVISIBLE
tvCardTopInfoParticipationCompleted.visibility = View.VISIBLE
} else {
with(tvCardTopInfoParticipantDetail) {
val participantDetail = context.getString(
R.string.map_card_participant_detail,
pingleEntity.curParticipants,
pingleEntity.maxParticipants
)
text = SpannableString(participantDetail).apply {
setSpan(
ForegroundColorSpan(
colorOf(category.textColor)
),
CUR_PARTICIPANTS_START,
pingleEntity.curParticipants.toString().length,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
setSpan(
TextAppearanceSpan(
context,
R.style.TextAppearance_Pingle_Title_Semi_30
),
CUR_PARTICIPANTS_START,
pingleEntity.curParticipants.toString().length + 1,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
setSpan(
TextAppearanceSpan(
context,
R.style.TextAppearance_Pingle_Title_Semi_20
),
pingleEntity.curParticipants.toString().length + 1,
participantDetail.length,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
}
}
tvCardTopInfoParticipationStatusCurrentParticipants.text =
pingleEntity.curParticipants.toString()
tvCardTopInfoParticipationStatusCurrentParticipants.setTextColor(colorOf(category.textColor))
tvCardTopInfoParticipationStatusSlash.visibility = View.VISIBLE
tvCardTopInfoParticipationStatusCurrentParticipants.visibility = View.VISIBLE
tvCardTopInfoParticipationStatusMaxParticipants.visibility = View.VISIBLE
tvCardTopInfoParticipationCompleted.visibility = View.INVISIBLE
tvCardTopInfoParticipationStatusMaxParticipants.text =
pingleEntity.maxParticipants.toString()
}
}
}

companion object {
const val CUR_PARTICIPANTS_START = 0
}
}

interface OnPingleCardClickListener {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/ic_card_arrow_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="6dp"
android:height="17dp"
android:viewportWidth="6"
android:viewportHeight="17">
<path
android:pathData="M1,13L5,8.5L1,4"
android:strokeLineJoin="round"
android:strokeWidth="1.58333"
android:fillColor="#00000000"
android:strokeColor="#FEFEFE"
android:strokeLineCap="round"/>
</vector>
9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_multi_big.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_multi_small.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_other_big.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_other_small.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_play_big.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_play_small.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_study_big.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_map_marker_study_small.xml

This file was deleted.

34 changes: 34 additions & 0 deletions app/src/main/res/drawable/ic_pin_multi_active.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="50dp"
android:height="55dp"
android:viewportWidth="50"
android:viewportHeight="55">
<path
android:strokeWidth="1"
android:pathData="M49,24.556C49,37.565 34,54 25,54C16,54 1,37.565 1,24.556C1,11.546 11.745,1 25,1C38.255,1 49,11.546 49,24.556Z"
android:strokeColor="#252930">
<aapt:attr name="android:fillColor">
<gradient
android:startX="-10.429"
android:startY="-12.819"
android:endX="44.018"
android:endY="53.955"
android:type="linear">
<item android:offset="0" android:color="#FFFFFFFF"/>
<item android:offset="0.371" android:color="#FFF2FF62"/>
<item android:offset="1" android:color="#FFFFFC00"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M31.264,33.891L37.152,27.903C36.351,27.563 35.402,27.006 34.504,26.093C33.606,25.18 33.058,24.214 32.725,23.399L26.837,29.388C26.378,29.855 26.148,30.089 25.95,30.347C25.717,30.651 25.517,30.98 25.354,31.328C25.216,31.623 25.113,31.936 24.908,32.563L23.824,35.87C23.723,36.178 23.802,36.519 24.028,36.749C24.254,36.979 24.589,37.059 24.892,36.956L28.143,35.854C28.759,35.645 29.068,35.54 29.358,35.4C29.7,35.234 30.023,35.031 30.322,34.793C30.575,34.592 30.805,34.359 31.264,33.891Z"
android:fillColor="#080909"/>
<path
android:pathData="M38.786,26.241C40.008,24.997 40.008,22.981 38.786,21.737C37.563,20.494 35.581,20.494 34.359,21.737L33.653,22.456C33.662,22.486 33.672,22.516 33.683,22.546C33.941,23.305 34.43,24.3 35.348,25.234C36.267,26.169 37.245,26.665 37.991,26.929C38.021,26.939 38.05,26.949 38.08,26.959L38.786,26.241Z"
android:fillColor="#080909"/>
<path
android:pathData="M11,19.872C11,25.044 14.724,28.028 17.895,30.569C18.225,30.833 18.548,31.092 18.861,31.348C20.033,32.31 21.163,33.215 22.292,33.215C22.518,33.215 22.967,33.112 22.985,33.108L23.319,32.089L23.345,32.011C23.526,31.458 23.656,31.062 23.833,30.682C24.043,30.236 24.299,29.814 24.598,29.424C24.852,29.092 25.143,28.797 25.548,28.385L25.548,28.385L25.605,28.327L25.685,28.246C26.505,27.232 27.487,26.232 28.642,25.055L28.696,25C29.671,24.008 33.376,20.338 33.571,20.278C33.572,20.277 33.574,20.276 33.575,20.275C33.581,20.142 33.583,20.008 33.583,19.872C33.583,14.162 27.373,10.112 22.292,15.602C17.211,10.112 11,14.162 11,19.872Z"
android:fillColor="#080909"
android:fillType="evenOdd"/>
</vector>
34 changes: 34 additions & 0 deletions app/src/main/res/drawable/ic_pin_multi_default.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:strokeWidth="1"
android:pathData="M14,14m-13.5,0a13.5,13.5 0,1 1,27 0a13.5,13.5 0,1 1,-27 0"
android:strokeColor="#000000">
<aapt:attr name="android:fillColor">
<gradient
android:startX="-6.667"
android:startY="-7.301"
android:endX="21.399"
android:endY="30.705"
android:type="linear">
<item android:offset="0" android:color="#FFFFFFFF"/>
<item android:offset="0.371" android:color="#FFF2FF62"/>
<item android:offset="1" android:color="#FFFFFC00"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M17.915,20.557L21.595,16.814C21.094,16.602 20.501,16.254 19.94,15.683C19.379,15.113 19.036,14.509 18.828,14L15.148,17.743C14.861,18.035 14.717,18.181 14.594,18.342C14.448,18.532 14.323,18.737 14.221,18.955C14.135,19.139 14.071,19.335 13.942,19.727L13.265,21.794C13.202,21.986 13.251,22.199 13.392,22.343C13.534,22.487 13.743,22.537 13.932,22.472L15.964,21.784C16.349,21.653 16.542,21.588 16.723,21.5C16.937,21.396 17.139,21.269 17.326,21.121C17.484,20.995 17.628,20.849 17.915,20.557Z"
android:fillColor="#080909"/>
<path
android:pathData="M22.616,15.776C23.38,14.998 23.38,13.738 22.616,12.961C21.852,12.184 20.613,12.184 19.849,12.961L19.407,13.41C19.414,13.429 19.42,13.447 19.426,13.466C19.588,13.941 19.893,14.562 20.468,15.146C21.042,15.731 21.653,16.041 22.119,16.205C22.138,16.212 22.156,16.218 22.174,16.225L22.616,15.776Z"
android:fillColor="#080909"/>
<path
android:pathData="M5.25,11.795C5.25,15.028 7.578,16.893 9.559,18.48C9.765,18.646 9.968,18.808 10.163,18.968C10.896,19.569 11.602,20.134 12.307,20.134C12.449,20.134 12.729,20.07 12.741,20.068L12.95,19.43L12.965,19.382C13.079,19.036 13.16,18.789 13.271,18.551C13.402,18.272 13.562,18.009 13.749,17.765C13.908,17.558 14.089,17.373 14.342,17.116L14.378,17.08L14.428,17.028C14.941,16.395 15.554,15.77 16.276,15.034L16.31,15C16.92,14.38 19.235,12.087 19.357,12.049C19.358,12.048 19.358,12.048 19.359,12.047C19.363,11.964 19.365,11.88 19.365,11.795C19.365,8.226 15.483,5.695 12.307,9.126C9.132,5.695 5.25,8.226 5.25,11.795Z"
android:fillColor="#080909"
android:fillType="evenOdd"/>
</vector>
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/ic_pin_others_active.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="55dp"
android:viewportWidth="50"
android:viewportHeight="55">
<path
android:strokeWidth="1"
android:pathData="M49,24.556C49,37.565 34,54 25,54C16,54 1,37.565 1,24.556C1,11.546 11.745,1 25,1C38.255,1 49,11.546 49,24.556Z"
android:fillColor="#FEFEFE"
android:strokeColor="#252930"/>
<path
android:pathData="M26.413,35.942L27.117,34.858C27.664,34.018 27.937,33.597 28.376,33.365C28.815,33.132 29.368,33.124 30.473,33.106C32.105,33.081 33.129,32.99 33.987,32.666C35.58,32.066 36.846,30.914 37.505,29.464C38,28.377 38,26.999 38,24.242V23.058C38,19.185 38,17.248 37.042,15.825C36.506,15.029 35.771,14.36 34.896,13.872C33.333,13 31.205,13 26.95,13H23.05C18.795,13 16.667,13 15.104,13.872C14.229,14.36 13.494,15.029 12.958,15.825C12,17.248 12,19.185 12,23.058V24.242C12,26.999 12,28.377 12.495,29.464C13.155,30.914 14.42,32.066 16.013,32.666C16.871,32.99 17.895,33.081 19.527,33.106C20.632,33.124 21.185,33.132 21.624,33.365C22.063,33.597 22.336,34.018 22.883,34.858L23.587,35.942C24.215,36.908 25.785,36.908 26.413,35.942ZM25,24.633C25.859,24.633 26.555,23.937 26.555,23.078C26.555,22.219 25.859,21.522 25,21.522C24.141,21.522 23.444,22.219 23.444,23.078C23.444,23.937 24.141,24.633 25,24.633ZM31.999,23.078C31.999,23.937 31.303,24.633 30.444,24.633C29.585,24.633 28.888,23.937 28.888,23.078C28.888,22.219 29.585,21.522 30.444,21.522C31.303,21.522 31.999,22.219 31.999,23.078ZM19.555,24.633C20.414,24.633 21.111,23.937 21.111,23.078C21.111,22.219 20.414,21.522 19.555,21.522C18.696,21.522 18,22.219 18,23.078C18,23.937 18.696,24.633 19.555,24.633Z"
android:fillColor="#080909"
android:fillType="evenOdd"/>
</vector>
Loading

0 comments on commit a2671b6

Please sign in to comment.