Skip to content

Commit

Permalink
[AN/USER] 디자인 수정 및 선택 업데이트 룰 추가 (#955) (#977)
Browse files Browse the repository at this point in the history
* feat: 상세 배경 dimmed 60 으로 올린다

* feat: 소셜 미디어 아이콘을 앱의 res 로 변경한다

* feat: add school image & background image

* feat: 상세 페에지 이름 길이 두 줄 대응

* feat(FestivalList): 텍스트 높이를 고정한다

* fix: 최근 검색어 전체 삭제 컬러 수정

* feat: RecyclerView 애니메이션 제거

* feat: Default user profile 변경

* feat: dim 60% 로 변경

* feat: 축제 상세 공연 목록을 4 줄 GridLayoutManager 로 변경한다.

* feat: 축제 공연 테두리 굵기를 0.2 로 줄인다

* feat: 아티스트에 둥근 테두리 추가

* feat: 아직 라인업이 공개되지 않았어요 메세지 추가

* feat: 바텀 네비게이션 전환 애니메이션 삭제

* feat: 선택 업데이트 요청 버전만 선택 업데이트 창을 띄운다

* style: ktlint check

* refactor: naming convention

* chore: Update App version to 2.0.4(13)
  • Loading branch information
SeongHoonC authored May 18, 2024
1 parent 2df37cd commit 8b995af
Show file tree
Hide file tree
Showing 53 changed files with 420 additions and 65 deletions.
4 changes: 2 additions & 2 deletions android/festago/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId = "com.festago.festago"
minSdk = 28
targetSdk = 34
versionCode = 12
versionName = "2.0.3"
versionCode = 13
versionName = "2.0.4"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.festago.festago.data.dto.school

import com.festago.festago.domain.model.social.SocialMedia
import com.festago.festago.domain.model.social.SocialMediaType
import kotlinx.serialization.Serializable

@Serializable
Expand All @@ -10,10 +11,15 @@ data class SocialMediaResponse(
val logoUrl: String,
val url: String,
) {
fun toDomain(): SocialMedia = SocialMedia(
type = type,
name = name,
logoUrl = logoUrl,
url = url,
)
fun toDomain(): SocialMedia {
val type = when (this.type) {
"FACEBOOK" -> SocialMediaType.FACEBOOK
"INSTAGRAM" -> SocialMediaType.INSTAGRAM
"YOUTUBE" -> SocialMediaType.YOUTUBE
"X" -> SocialMediaType.X
else -> SocialMediaType.NONE
}

return SocialMedia(type = type, name = name, logoUrl = logoUrl, url = url)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ data class SchoolInfoResponse(
schoolName = name ?: "",
logoUrl = logoUrl ?: "",
backgroundUrl = backgroundImageUrl ?: "",
socialMedia = socialMedias.map { it.toDomain() },
socialMedia = socialMedias.map { it.toDomain() }
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.festago.festago.domain.model.festival.Festival
import com.festago.festago.domain.model.festival.FestivalsPage
import com.festago.festago.domain.model.school.School
import com.festago.festago.domain.model.social.SocialMedia
import com.festago.festago.domain.model.social.SocialMediaType
import com.festago.festago.domain.repository.ArtistRepository
import java.time.LocalDate
import javax.inject.Inject
Expand All @@ -22,13 +23,13 @@ class FakeArtistRepository @Inject constructor() : ArtistRepository {
"https://static.wikia.nocookie.net/witchers/images/d/d9/New_Jeans_Cover.png/revision/latest?cb=20220801091438",
listOf(
SocialMedia(
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Instagram_icon.png/1200px-Instagram_icon.png?20200512141346",
SocialMediaType.INSTAGRAM,
"공식 인스타그램",
"https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Instagram_logo_2016.svg/264px-Instagram_logo_2016.svg.png",
"https://www.instagram.com/newjeans_official/",
),
SocialMedia(
"https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/X_logo_2023.svg/600px-X_logo_2023.svg.png?20230819000805",
SocialMediaType.INSTAGRAM,
"공식 엑스",
"https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/X_logo_2023.svg/531px-X_logo_2023.svg.png",
"https://twitter.com/NewJeans_ADOR",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.festago.festago.domain.model.festival.Festival
import com.festago.festago.domain.model.festival.FestivalDetail
import com.festago.festago.domain.model.school.School
import com.festago.festago.domain.model.social.SocialMedia
import com.festago.festago.domain.model.social.SocialMediaType
import com.festago.festago.domain.model.stage.Stage
import java.time.LocalDate
import java.time.LocalDateTime
Expand All @@ -20,13 +21,13 @@ object FakeFestivals {
school = School(id = 2L, name = "부경대학교", imageUrl = ""),
socialMedias = listOf(
SocialMedia(
type = "INSTAGRAM",
type = SocialMediaType.INSTAGRAM,
name = "총학생회 인스타그램",
logoUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Instagram_logo_2016.svg/2048px-Instagram_logo_2016.svg.png",
url = "https://www.instagram.com/25th_solution/",
),
SocialMedia(
type = "FACEBOOK",
type = SocialMediaType.FACEBOOK,
name = "총학생회 페이스북",
logoUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Facebook_f_logo_%282019%29.svg/1200px-Facebook_f_logo_%282019%29.svg.png",
url = "https://www.facebook.com/23rdemotion/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.festago.festago.data.repository

import com.festago.festago.domain.model.school.SchoolInfo
import com.festago.festago.domain.model.social.SocialMedia
import com.festago.festago.domain.model.social.SocialMediaType

object FakeSchool {
val googleSchool = SchoolInfo(
Expand All @@ -11,13 +12,13 @@ object FakeSchool {
backgroundUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/1200px-Google_2015_logo.svg.png",
socialMedia = listOf(
SocialMedia(
type = "INSTAGRAM",
type = SocialMediaType.INSTAGRAM,
name = "구글대학교 인스타",
logoUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Instagram_logo_2016.svg/2048px-Instagram_logo_2016.svg.png",
url = "https://www.instagram.com/",
),
SocialMedia(
type = "INSTAGRAM",
type = SocialMediaType.INSTAGRAM,
name = "구글대학교 X",
logoUrl = "https://about.x.com/content/dam/about-twitter/x/brand-toolkit/logo-black.png.twimg.1920.png",
url = "https://twitter.com/?lang=en",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.festago.festago.domain.model.social

data class SocialMedia(
val type: String,
val type: SocialMediaType,
val name: String,
val logoUrl: String,
val url: String
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.festago.festago.domain.model.social

enum class SocialMediaType {
FACEBOOK,
INSTAGRAM,
YOUTUBE,
X,
NONE,
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import com.festago.festago.domain.model.social.SocialMediaType
import com.festago.festago.presentation.R
import com.festago.festago.presentation.databinding.FragmentArtistDetailBinding
import com.festago.festago.presentation.databinding.ItemMediaBinding
Expand Down Expand Up @@ -107,13 +108,23 @@ class ArtistDetailFragment : Fragment() {

uiState.artist.artistMedia.map { media ->
with(ItemMediaBinding.inflate(layoutInflater, binding.llcArtistMedia, false)) {
imageUrl = media.logoUrl
findMediaRes(media.type)
ivImage.setOnClickListener { startBrowser(media.url) }
binding.llcArtistMedia.addView(ivImage)
}
}
}

private fun findMediaRes(type: SocialMediaType): Int {
return when (type) {
SocialMediaType.YOUTUBE -> R.drawable.ic_youtube
SocialMediaType.INSTAGRAM -> R.drawable.ic_instagram
SocialMediaType.X -> R.drawable.ic_x
SocialMediaType.FACEBOOK -> R.drawable.ic_facebook
SocialMediaType.NONE -> R.drawable.bg_festago_default
}
}

private fun handleError(uiState: ArtistDetailUiState.Error) {
binding.refreshListener = { uiState.refresh(args.artist.id) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ArtistDetailFestivalViewHolder(
init {
binding.rvFestivalArtists.adapter = artistAdapter
binding.rvFestivalArtists.addItemDecoration(ArtistItemDecoration())
binding.rvFestivalArtists.itemAnimator = null
}

fun bind(item: FestivalItemUiState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import com.festago.festago.domain.model.social.SocialMedia
import com.festago.festago.domain.model.social.SocialMediaType
import com.festago.festago.presentation.R
import com.festago.festago.presentation.databinding.FragmentFestivalDetailBinding
import com.festago.festago.presentation.databinding.ItemMediaBinding
Expand Down Expand Up @@ -110,13 +112,24 @@ class FestivalDetailFragment : Fragment() {
binding.llcFestivalSocialMedia.removeAllViews()
uiState.festival.socialMedias.forEach { media ->
with(ItemMediaBinding.inflate(layoutInflater, binding.llcFestivalSocialMedia, false)) {
imageUrl = media.logoUrl
ivImage.setImageResource(findMediaRes(media))
ivImage.setOnClickListener { startBrowser(media.url) }
binding.llcFestivalSocialMedia.addView(ivImage)
}
}
}

private fun findMediaRes(media: SocialMedia): Int {
val res = when (media.type) {
SocialMediaType.INSTAGRAM -> R.drawable.ic_instagram
SocialMediaType.FACEBOOK -> R.drawable.ic_facebook
SocialMediaType.YOUTUBE -> R.drawable.ic_youtube
SocialMediaType.X -> R.drawable.ic_x
else -> R.drawable.bg_festago_default
}
return res
}

private fun handleError(uiState: FestivalDetailUiState.Error) {
binding.refreshListener = { uiState.refresh(args.festival.id) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class StageViewHolder(

init {
binding.rvStageArtists.adapter = artistAdapter
binding.rvStageArtists.itemAnimator = null
}

fun bind(item: StageItemUiState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class FestivalBookmarkViewHolder(
init {
binding.rvFestivalArtists.adapter = artistAdapter
binding.rvFestivalArtists.addItemDecoration(ArtistItemDecoration())
binding.rvFestivalArtists.itemAnimator = null
}

fun bind(item: FestivalBookmarkItemUiState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class FestivalListFestivalViewHolder(
init {
binding.rvFestivalArtists.adapter = artistAdapter
binding.rvFestivalArtists.addItemDecoration(ArtistItemDecoration())
binding.rvFestivalArtists.itemAnimator = null
}

fun bind(item: FestivalItemUiState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SchoolDetailFestivalViewHolder(
init {
binding.rvFestivalArtists.adapter = artistAdapter
binding.rvFestivalArtists.addItemDecoration(ArtistItemDecoration())
binding.rvFestivalArtists.itemAnimator = null
}

fun bind(item: FestivalItemUiState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import com.festago.festago.domain.model.social.SocialMedia
import com.festago.festago.domain.model.social.SocialMediaType
import com.festago.festago.presentation.R
import com.festago.festago.presentation.databinding.FragmentSchoolDetailBinding
import com.festago.festago.presentation.databinding.ItemMediaBinding
Expand Down Expand Up @@ -107,13 +109,25 @@ class SchoolDetailFragment : Fragment() {

uiState.schoolInfo.socialMedia.forEach { media ->
with(ItemMediaBinding.inflate(layoutInflater, binding.llcSchoolSocialMedia, false)) {
imageUrl = media.logoUrl
if (media.type == SocialMediaType.NONE) return@with
ivImage.setImageResource(findMediaRes(media))
ivImage.setOnClickListener { startBrowser(media.url) }
binding.llcSchoolSocialMedia.addView(ivImage)
}
}
}

private fun findMediaRes(media: SocialMedia): Int {
val res = when (media.type) {
SocialMediaType.INSTAGRAM -> R.drawable.ic_instagram
SocialMediaType.FACEBOOK -> R.drawable.ic_facebook
SocialMediaType.YOUTUBE -> R.drawable.ic_youtube
SocialMediaType.X -> R.drawable.ic_x
else -> R.drawable.bg_festago_default
}
return res
}

private fun handleError(uiState: SchoolDetailUiState.Error) {
binding.refreshListener = { uiState.refresh(args.school.id) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class SearchFragment : Fragment() {
private fun initRecyclerView() {
recentSearchAdapter = RecentSearchAdapter()
binding.rvRecentSearch.adapter = recentSearchAdapter
binding.rvRecentSearch.itemAnimator = null
}

private fun initBack() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class FestivalSearchViewHolder(
init {
binding.rvFestivalArtists.adapter = artistAdapter
binding.rvFestivalArtists.addItemDecoration(ArtistItemDecoration())
binding.rvFestivalArtists.itemAnimator = null
}

fun bind(item: FestivalSearchItemUiState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,27 @@ class SplashActivity : ComponentActivity() {
}

private fun requestUpdate(latestVersion: Long) {
val isForceUpdateVersion = firebaseRemoteConfig.getBoolean(KEY_FORCE_UPDATE_REQUIRED)
val latestVersionDescription =
firebaseRemoteConfig.getString(KEY_LATEST_VERSION_DESCRIPTION)

if (checkForceUpdate(latestVersionDescription)) return
checkOptionalUpdate(latestVersion, latestVersionDescription)
}

private fun checkForceUpdate(latestVersionDescription: String): Boolean {
val isForceUpdateVersion = firebaseRemoteConfig.getBoolean(KEY_FORCE_UPDATE_REQUIRED)
if (isForceUpdateVersion) {
requestForceUpdate(message = latestVersionDescription)
return
return true
}
return false
}

private fun checkOptionalUpdate(latestVersion: Long, latestVersionDescription: String) {
val isOptionalUpdateVersion = firebaseRemoteConfig.getBoolean(KEY_OPTIONAL_UPDATE_REQUIRED)
if (isOptionalUpdateVersion) {
requestOptionalUpdate(latestVersion = latestVersion, message = latestVersionDescription)
}
requestOptionalUpdate(latestVersion = latestVersion, message = latestVersionDescription)
}

private fun requestForceUpdate(message: String) {
Expand Down Expand Up @@ -188,6 +201,7 @@ class SplashActivity : ComponentActivity() {
private const val DEBUG_REMOTE_CONFIG_FETCH_INTERVAL = 0L
private const val RELEASE_REMOTE_CONFIG_FETCH_INTERVAL = 3600L
private const val KEY_FORCE_UPDATE_REQUIRED = "FORCE_UPDATE_REQUIRED"
private const val KEY_OPTIONAL_UPDATE_REQUIRED = "OPTIONAL_UPDATE_REQUIRED"
private const val KEY_LATEST_VERSION = "LATEST_VERSION"
private const val KEY_LATEST_VERSION_DESCRIPTION = "LATEST_VERSION_DESCRIPTION"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke
android:width="0.4dp"
android:color="@color/background_gray_03" />
</shape>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:color="@color/background_gray_03"
android:width="1dp" />
<solid
android:color="@color/background_gray_02" />
</shape>
android:width="0.2dp"
android:color="@color/background_gray_03" />
<solid android:color="@color/background_gray_02" />
</shape>
16 changes: 16 additions & 0 deletions android/festago/presentation/src/main/res/drawable/ic_facebook.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<group>
<clip-path
android:pathData="M2,2h16v16h-16z"/>
<path
android:pathData="M18,10C18,5.582 14.418,2 10,2C5.582,2 2,5.582 2,10C2,13.752 4.583,16.9 8.068,17.764V12.445H6.418V10H8.068V8.947C8.068,6.224 9.3,4.962 11.973,4.962C12.48,4.962 13.355,5.061 13.712,5.16V7.376C13.524,7.356 13.196,7.347 12.788,7.347C11.476,7.347 10.97,7.844 10.97,9.135V10H13.583L13.134,12.445H10.97V17.941C14.931,17.463 18,14.09 18,10H18Z"
android:fillColor="#0866FF"/>
<path
android:pathData="M13.134,12.445L13.583,10H10.97V9.135C10.97,7.843 11.476,7.346 12.788,7.346C13.196,7.346 13.524,7.356 13.712,7.376V5.16C13.355,5.061 12.48,4.961 11.973,4.961C9.3,4.961 8.068,6.224 8.068,8.946V10H6.418V12.445H8.068V17.764C8.686,17.918 9.334,18 10,18C10.328,18 10.652,17.98 10.969,17.941V12.445H13.134H13.134Z"
android:fillColor="#ffffff"/>
</group>
</vector>
Loading

0 comments on commit 8b995af

Please sign in to comment.