-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat-joingroupcode-view
# Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/res/values/strings.xml
- Loading branch information
Showing
44 changed files
with
1,269 additions
and
37 deletions.
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
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,9 @@ | ||
package org.sopt.pingle.domain.model | ||
|
||
data class PinEntity( | ||
val id: Long, | ||
val x: Double, | ||
val y: Double, | ||
val category: String, | ||
val meetingCount: Int | ||
) |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/org/sopt/pingle/presentation/mapper/PinMapper.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,21 @@ | ||
package org.sopt.pingle.presentation.mapper | ||
|
||
import com.naver.maps.geometry.LatLng | ||
import com.naver.maps.map.overlay.Marker | ||
import com.naver.maps.map.overlay.OverlayImage | ||
import org.sopt.pingle.R | ||
import org.sopt.pingle.domain.model.PinEntity | ||
import org.sopt.pingle.presentation.type.CategoryType | ||
|
||
fun PinEntity.toMarker(): Marker = Marker().apply { | ||
position = LatLng(y, x) | ||
isHideCollidedMarkers = true | ||
icon = OverlayImage.fromResource( | ||
when (category) { | ||
CategoryType.PLAY.toString() -> R.drawable.ic_map_marker_play_small | ||
CategoryType.STUDY.toString() -> R.drawable.ic_map_marker_study_small | ||
CategoryType.MULTI.toString() -> R.drawable.ic_map_marker_multi_small | ||
else -> R.drawable.ic_map_marker_other_small | ||
} | ||
) | ||
} |
44 changes: 44 additions & 0 deletions
44
app/src/main/java/org/sopt/pingle/presentation/ui/common/AllModalDialogFragment.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,44 @@ | ||
package org.sopt.pingle.presentation.ui.common | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import org.sopt.pingle.R | ||
import org.sopt.pingle.databinding.DialogAllModalBinding | ||
import org.sopt.pingle.util.base.BindingDialogFragment | ||
|
||
class AllModalDialogFragment( | ||
private val title: String, | ||
private val detail: String, | ||
private val buttonText: String, | ||
private val textButtonText: String, | ||
private val clickBtn: () -> Unit, | ||
private val clickTextBtn: () -> Unit | ||
) : BindingDialogFragment<DialogAllModalBinding>(R.layout.dialog_all_modal) { | ||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
initLayout() | ||
addListeners() | ||
} | ||
|
||
private fun initLayout() { | ||
with(binding) { | ||
tvAllModalTitle.text = title | ||
tvAllModalDetail.text = detail | ||
btnAllModalButton.text = buttonText | ||
tvAllModalTextButton.text = textButtonText | ||
} | ||
} | ||
|
||
private fun addListeners() { | ||
binding.btnAllModalButton.setOnClickListener { | ||
clickBtn() | ||
dismiss() | ||
} | ||
|
||
binding.tvAllModalTextButton.setOnClickListener { | ||
clickTextBtn() | ||
dismiss() | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
app/src/main/java/org/sopt/pingle/presentation/ui/common/WebViewActivity.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,42 @@ | ||
package org.sopt.pingle.presentation.ui.common | ||
|
||
import android.annotation.SuppressLint | ||
import android.os.Bundle | ||
import android.webkit.WebChromeClient | ||
import android.webkit.WebViewClient | ||
import org.sopt.pingle.R | ||
import org.sopt.pingle.databinding.ActivityWebViewBinding | ||
import org.sopt.pingle.util.base.BindingActivity | ||
|
||
class WebViewActivity : BindingActivity<ActivityWebViewBinding>(R.layout.activity_web_view) { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initLayout() | ||
loadWebView() | ||
} | ||
|
||
@SuppressLint("SetJavaScriptEnabled") | ||
private fun initLayout() { | ||
binding.wvWebView.apply { | ||
webViewClient = WebViewClient() | ||
webChromeClient = WebChromeClient() | ||
|
||
settings.apply { | ||
javaScriptEnabled = true | ||
javaScriptCanOpenWindowsAutomatically = true | ||
loadWithOverviewMode = true | ||
useWideViewPort = true | ||
domStorageEnabled = true | ||
} | ||
} | ||
} | ||
|
||
private fun loadWebView() { | ||
intent.getStringExtra(WEB_VIEW_LINK)?.let { binding.wvWebView.loadUrl(it) } | ||
} | ||
|
||
companion object { | ||
const val WEB_VIEW_LINK = "WebViewLink" | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
app/src/main/java/org/sopt/pingle/presentation/ui/joingroup/JoinGroupSuccessActivity.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,58 @@ | ||
package org.sopt.pingle.presentation.ui.joingroup | ||
|
||
import android.os.Bundle | ||
import android.text.Spannable | ||
import android.text.SpannableString | ||
import android.text.style.ForegroundColorSpan | ||
import android.text.style.TextAppearanceSpan | ||
import androidx.core.content.ContextCompat | ||
import org.sopt.pingle.R | ||
import org.sopt.pingle.databinding.ActivityJoinGroupSuccessBinding | ||
import org.sopt.pingle.util.base.BindingActivity | ||
|
||
class JoinGroupSuccessActivity : | ||
BindingActivity<ActivityJoinGroupSuccessBinding>(R.layout.activity_join_group_success) { | ||
private lateinit var groupName: String | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initLayout() | ||
} | ||
|
||
private fun initLayout() { | ||
// TODO 이전 화면에서 Intent를 통해서 groupName을 가져옴 | ||
groupName = "SOPT" | ||
|
||
binding.tvJoinGroupSuccessDescriptionGroupName.text = SpannableString( | ||
getString( | ||
R.string.join_group_success_description_group_name, | ||
groupName | ||
) | ||
).apply { | ||
setSpan( | ||
TextAppearanceSpan( | ||
this@JoinGroupSuccessActivity, | ||
R.style.TextAppearance_Pingle_Sub_Semi_16 | ||
), | ||
GROUP_NAME_START, | ||
groupName.length, | ||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE | ||
) | ||
setSpan( | ||
ForegroundColorSpan( | ||
ContextCompat.getColor( | ||
this@JoinGroupSuccessActivity, | ||
R.color.g_01 | ||
) | ||
), | ||
GROUP_NAME_START, | ||
groupName.length, | ||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE | ||
) | ||
} | ||
} | ||
|
||
companion object { | ||
const val GROUP_NAME_START = 0 | ||
} | ||
} |
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.