From d1d3dcc98ed409b112f93c8fc017b828df8b4898 Mon Sep 17 00:00:00 2001 From: BuNa <56534241+tmdgh1592@users.noreply.github.com> Date: Sun, 28 Jan 2024 23:50:32 +0900 Subject: [PATCH] =?UTF-8?q?merge:=20=ED=96=89=EC=82=AC=20=EC=B9=B4?= =?UTF-8?q?=EC=B9=B4=EC=98=A4=20=EA=B3=B5=EC=9C=A0=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?(#888)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to: #839 --- android/2023-emmsale/app/build.gradle.kts | 19 +++++-- android/2023-emmsale/app/proguard-rules.pro | 7 +++ .../app/src/main/AndroidManifest.xml | 15 +++++- .../emmsale/presentation/KerdyApplication.kt | 3 ++ .../presentation/base/RefreshableViewModel.kt | 2 +- .../ui/eventDetail/EventDetailActivity.kt | 14 ++++- .../ui/eventDetail/EventDetailViewModel.kt | 24 ++++++--- .../ui/eventDetail/eventSharer/EventSharer.kt | 53 +++++++++++++++++++ .../eventSharer/EventTemplateMaker.kt | 34 ++++++++++++ .../viewHolder/FeedDetailViewHolder.kt | 3 +- .../NotificationTagConfigViewModel.kt | 6 ++- .../ui/setting/SettingFragment.kt | 3 +- .../ic_comment_child_comment_arrow.xml | 4 +- .../drawable/ic_editmyprofile_image_edit.xml | 4 +- .../res/drawable/ic_eventdetail_share.xml | 9 ++++ .../res/drawable/ic_profile_education.xml | 4 +- .../drawable/img_profile_image_decoration.xml | 17 +++--- .../drawable/img_profile_image_masking.xml | 4 +- .../res/layout-land/activity_event_detail.xml | 43 +++++++-------- .../res/layout/activity_blocked_members.xml | 10 ++-- .../res/layout/activity_edit_my_profile.xml | 38 ++++++------- .../main/res/layout/activity_event_detail.xml | 4 +- .../main/res/layout/activity_feed_writing.xml | 20 +++---- .../src/main/res/layout/activity_login.xml | 6 +-- .../main/res/layout/activity_message_list.xml | 24 ++++----- .../main/res/layout/activity_my_comments.xml | 12 ++--- .../layout/activity_notification_config.xml | 16 +++--- .../activity_notification_tag_config.xml | 14 ++--- .../res/layout/activity_notifications.xml | 18 +++---- .../main/res/layout/activity_onboarding.xml | 10 ++-- .../src/main/res/layout/activity_profile.xml | 24 ++++----- .../layout/activity_recruitment_detail.xml | 28 +++++----- .../layout/activity_recruitment_writing.xml | 6 +-- .../src/main/res/layout/activity_splash.xml | 12 ++--- .../dialog_recruitmentdetail_send_message.xml | 2 +- .../main/res/layout/dialog_send_message.xml | 2 +- .../main/res/layout/fragment_feed_list.xml | 18 +++---- .../main/res/layout/fragment_message_room.xml | 16 +++--- .../main/res/layout/fragment_my_profile.xml | 24 ++++----- .../res/layout/fragment_onboarding_club.xml | 16 +++--- .../layout/fragment_onboarding_education.xml | 16 +++--- .../res/layout/fragment_onboarding_field.xml | 12 ++--- .../res/layout/fragment_onboarding_name.xml | 6 +-- .../main/res/layout/fragment_recruitments.xml | 14 ++--- .../res/layout/fragment_scrapped_event.xml | 10 ++-- .../src/main/res/layout/fragment_setting.xml | 14 ++--- .../src/main/res/layout/item_all_comment.xml | 42 +++++++-------- .../layout/item_comment_notification_body.xml | 4 +- .../src/main/res/layout/item_competition.xml | 10 ++-- .../layout/item_feeddetail_feed_detail.xml | 4 +- .../item_interest_event_notification.xml | 4 +- .../res/layout/item_mycomments_comment.xml | 12 ++--- .../main/res/layout/item_other_message.xml | 2 +- .../item_recent_notification_header.xml | 10 ++-- .../src/main/res/layout/item_recruitment.xml | 8 +-- .../main/res/layout/item_scrapped_event.xml | 8 +-- .../main/res/layout/item_writing_image.xml | 2 +- .../res/layout/layout_basic_input_window.xml | 6 +-- .../layout/layout_sub_text_input_window.xml | 14 ++--- .../res/menu/menu_eventdetail_toolbar.xml | 9 ++++ .../app/src/main/res/values/strings.xml | 6 +++ android/2023-emmsale/settings.gradle | 1 + 62 files changed, 486 insertions(+), 316 deletions(-) create mode 100644 android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventSharer.kt create mode 100644 android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventTemplateMaker.kt create mode 100644 android/2023-emmsale/app/src/main/res/drawable/ic_eventdetail_share.xml create mode 100644 android/2023-emmsale/app/src/main/res/menu/menu_eventdetail_toolbar.xml diff --git a/android/2023-emmsale/app/build.gradle.kts b/android/2023-emmsale/app/build.gradle.kts index 4bf230383..0f9ae95ea 100644 --- a/android/2023-emmsale/app/build.gradle.kts +++ b/android/2023-emmsale/app/build.gradle.kts @@ -25,15 +25,16 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - buildConfigField( - "String", - "GITHUB_CLIENT_ID", - getApiKey("GH_CLIENT_ID"), - ) + buildConfigField("String", "GITHUB_CLIENT_ID", getApiKey("GH_CLIENT_ID")) + resValue("string", "kakao_app_key", getApiKey("KAKAO_APP_KEY")) + resValue("string", "kakao_scheme", getApiKey("KAKAO_SCHEME")) + resValue("string", "kakao_host", getApiKey("KAKAO_HOST")) } + buildFeatures { buildConfig = true } + buildTypes { debug { buildConfigField("String", "BASE_URL", "\"https://dev.kerdy.kro.kr\"") @@ -59,16 +60,20 @@ android { signingConfig = signingConfigs.getByName("debug") } } + compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = "17" } + dataBinding { enable = true } + tasks.withType(Test::class) { testLogging { events.addAll( @@ -80,6 +85,7 @@ android { ) } } + testOptions { unitTests.isReturnDefaultValues = true unitTests.isIncludeAndroidResources = true @@ -171,6 +177,9 @@ dependencies { implementation("androidx.room:room-runtime:$roomVersion") kapt("androidx.room:room-compiler:$roomVersion") implementation("androidx.room:room-ktx:$roomVersion") + + // Kakao Share + implementation("com.kakao.sdk:v2-share:2.12.0") } kapt { diff --git a/android/2023-emmsale/app/proguard-rules.pro b/android/2023-emmsale/app/proguard-rules.pro index 38a0eacdb..df45f9be9 100644 --- a/android/2023-emmsale/app/proguard-rules.pro +++ b/android/2023-emmsale/app/proguard-rules.pro @@ -10,3 +10,10 @@ # ApiResponse 클래스의 타입 매개변수를 유지하기 위해 추가. 안하면 CallAdapter에서 retrofit2.Call를 반환하는 CallAdapter 만들 수 없음. -keepnames, allowobfuscation class com.emmsale.data.common.retrofit.callAdapter.ApiResponse + +# 카카오 공유하기 +-if interface * { @retrofit2.http.* public *** *(...); } +-keep,allowoptimization,allowshrinking,allowobfuscation class <3> +-keep interface com.kakao.sdk.**.*Api +-keep class com.kakao.sdk.**.model.* { ; } +-keep class * extends com.google.gson.TypeAdapter \ No newline at end of file diff --git a/android/2023-emmsale/app/src/main/AndroidManifest.xml b/android/2023-emmsale/app/src/main/AndroidManifest.xml index 5151dc3a1..24f2124ee 100644 --- a/android/2023-emmsale/app/src/main/AndroidManifest.xml +++ b/android/2023-emmsale/app/src/main/AndroidManifest.xml @@ -58,7 +58,20 @@ android:name=".presentation.ui.main.MainActivity" android:launchMode="singleTask" /> - + + + + + + + + + + Unit = {}, onFailure: suspend (code: Int, message: String?) -> Unit = { _, _ -> dispatchFetchFailEvent() }, onLoading: suspend () -> Unit = {}, - onNetworkError: suspend () -> Unit = {}, + onNetworkError: suspend () -> Unit = { dispatchNetworkErrorEvent() }, onStart: suspend () -> Unit = {}, onFinish: suspend () -> Unit = {}, ): Job = requestNetwork( diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailActivity.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailActivity.kt index 2cbd89ef0..5a1ec8ef2 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailActivity.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailActivity.kt @@ -35,6 +35,7 @@ class EventDetailActivity : registerScreen(this) + fetchEvent() setupDataBinding() setupFragmentStateAdapter() setupBackPressedDispatcher() @@ -44,6 +45,14 @@ class EventDetailActivity : observeUiEvent() } + private fun fetchEvent() { + val eventId = intent.data?.getQueryParameter(EVENT_ID_KEY)?.toLong() + if (eventId != null) viewModel.eventId = eventId + + viewModel.fetchEvent() + viewModel.fetchIsScrapped() + } + private fun setupDataBinding() { binding.vm = viewModel binding.navigateToUrl = ::navigateToUrl @@ -79,7 +88,6 @@ class EventDetailActivity : TabLayoutMediator(binding.tablayoutEventdetail, binding.vpEventdetail) { tab, position -> tab.text = tabNames[position] }.attach() - binding.vpEventdetail.isUserInputEnabled = false } private fun setupBackPressedDispatcher() { @@ -96,6 +104,10 @@ class EventDetailActivity : private fun setupToolbar() { binding.tbEventdetail.setNavigationOnClickListener { onBackPressedDispatcher.onBackPressed() } + binding.tbEventdetail.setOnMenuItemClickListener { item -> + if (item.itemId == R.id.share_event) viewModel.shareEvent() + true + } } private fun setupOnTabSelectedListener() { diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailViewModel.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailViewModel.kt index bb369b49e..7b492cc55 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailViewModel.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/EventDetailViewModel.kt @@ -12,6 +12,8 @@ import com.emmsale.presentation.base.RefreshableViewModel import com.emmsale.presentation.common.livedata.NotNullLiveData import com.emmsale.presentation.common.livedata.NotNullMutableLiveData import com.emmsale.presentation.common.livedata.SingleLiveEvent +import com.emmsale.presentation.ui.eventDetail.eventSharer.EventSharer +import com.emmsale.presentation.ui.eventDetail.eventSharer.EventTemplateMaker import com.emmsale.presentation.ui.eventDetail.uiState.EventDetailScreenUiState import com.emmsale.presentation.ui.eventDetail.uiState.EventDetailUiEvent import dagger.hilt.android.lifecycle.HiltViewModel @@ -24,8 +26,10 @@ class EventDetailViewModel @Inject constructor( stateHandle: SavedStateHandle, private val eventRepository: EventRepository, private val recruitmentRepository: RecruitmentRepository, + private val eventTemplateMaker: EventTemplateMaker, + private val eventSharer: EventSharer, ) : RefreshableViewModel() { - val eventId = stateHandle[EVENT_ID_KEY] ?: DEFAULT_EVENT_ID + var eventId = stateHandle[EVENT_ID_KEY] ?: DEFAULT_EVENT_ID private val _event = NotNullMutableLiveData(Event()) val event: NotNullLiveData = _event @@ -51,17 +55,12 @@ class EventDetailViewModel @Inject constructor( private val _uiEvent = SingleLiveEvent() val uiEvent: LiveData = _uiEvent - init { - fetchEvent() - fetchIsScrapped() - } - - private fun fetchEvent(): Job = fetchData( + fun fetchEvent(): Job = fetchData( fetchData = { eventRepository.getEventDetail(eventId) }, onSuccess = { _event.value = it }, ) - private fun fetchIsScrapped(): Job = viewModelScope.launch { + fun fetchIsScrapped(): Job = viewModelScope.launch { when (val result = eventRepository.isScraped(eventId)) { is Success -> _isScraped.value = result.data else -> {} @@ -117,6 +116,15 @@ class EventDetailViewModel @Inject constructor( onFinish = { _canStartToWriteRecruitment.value = true }, ) + fun shareEvent() { + val eventShareTemplate = eventTemplateMaker.create( + eventId = eventId, + eventName = event.value.name, + posterUrl = event.value.posterImageUrl, + ) + eventSharer.shareEvent(eventShareTemplate) + } + companion object { const val EVENT_ID_KEY = "EVENT_ID_KEY" private const val DEFAULT_EVENT_ID = -1L diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventSharer.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventSharer.kt new file mode 100644 index 000000000..64640f924 --- /dev/null +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventSharer.kt @@ -0,0 +1,53 @@ +package com.emmsale.presentation.ui.eventDetail.eventSharer + +import android.content.Context +import com.emmsale.R +import com.emmsale.presentation.common.extension.showToast +import com.kakao.sdk.common.util.KakaoCustomTabsClient +import com.kakao.sdk.share.ShareClient +import com.kakao.sdk.share.WebSharerClient +import com.kakao.sdk.template.model.FeedTemplate +import dagger.hilt.android.qualifiers.ApplicationContext +import javax.inject.Inject + +class EventSharer @Inject constructor( + @ApplicationContext private val context: Context, +) { + private val isNotKakaoTalkInstalled + get() = !ShareClient.instance.isKakaoTalkSharingAvailable(context) + + fun shareEvent(eventTemplate: FeedTemplate) { + if (isNotKakaoTalkInstalled) { + handleKakaoNotInstalledError(eventTemplate) + return + } + + share(eventTemplate) + } + + private fun handleKakaoNotInstalledError(eventTemplate: FeedTemplate) { + val sharerUrl = WebSharerClient.instance.makeDefaultUrl(eventTemplate) + + runCatching { + KakaoCustomTabsClient.openWithDefault(context, sharerUrl) + }.onFailure { + context.showToast(R.string.eventdetail_no_exist_browser) + } + + runCatching { + KakaoCustomTabsClient.open(context, sharerUrl) + }.onFailure { + context.showToast(R.string.eventdetail_no_exist_browser) + } + } + + private fun share(eventTemplate: FeedTemplate) { + ShareClient.instance.shareDefault(context, eventTemplate) { sharingResult, error -> + if (error != null) { + context.showToast(R.string.eventdetail_kakao_share_fail) + } else if (sharingResult != null) { + context.startActivity(sharingResult.intent) + } + } + } +} diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventTemplateMaker.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventTemplateMaker.kt new file mode 100644 index 000000000..32bab37bc --- /dev/null +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/eventDetail/eventSharer/EventTemplateMaker.kt @@ -0,0 +1,34 @@ +package com.emmsale.presentation.ui.eventDetail.eventSharer + +import android.content.Context +import com.emmsale.R +import com.emmsale.presentation.ui.eventDetail.EventDetailViewModel +import com.kakao.sdk.template.model.Button +import com.kakao.sdk.template.model.Content +import com.kakao.sdk.template.model.FeedTemplate +import com.kakao.sdk.template.model.Link +import dagger.hilt.android.qualifiers.ApplicationContext +import javax.inject.Inject + +class EventTemplateMaker @Inject constructor( + @ApplicationContext private val context: Context, +) { + fun create( + eventId: Long, + eventName: String, + posterUrl: String?, + ): FeedTemplate = FeedTemplate( + content = Content( + title = eventName, + description = context.getString(R.string.eventdetail_share_template_description), + imageUrl = posterUrl ?: "", + link = Link(androidExecutionParams = mapOf(EventDetailViewModel.EVENT_ID_KEY to eventId.toString())), + ), + buttons = listOf( + Button( + context.getString(R.string.eventdetail_share_button_title), + Link(androidExecutionParams = mapOf(EventDetailViewModel.EVENT_ID_KEY to eventId.toString())), + ), + ), + ) +} diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/feedDetail/recyclerView/viewHolder/FeedDetailViewHolder.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/feedDetail/recyclerView/viewHolder/FeedDetailViewHolder.kt index f572dd729..448c2870a 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/feedDetail/recyclerView/viewHolder/FeedDetailViewHolder.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/feedDetail/recyclerView/viewHolder/FeedDetailViewHolder.kt @@ -14,7 +14,8 @@ class FeedDetailViewHolder( parent: ViewGroup, onAuthorImageClick: (authorId: Long) -> Unit, ) : FeedOrCommentViewHolder( - LayoutInflater.from(parent.context).inflate(R.layout.item_feeddetail_feed_detail, parent, false), + LayoutInflater.from(parent.context) + .inflate(R.layout.item_feeddetail_feed_detail, parent, false), ) { private val binding = ItemFeeddetailFeedDetailBinding.bind(itemView) diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/notificationTagConfig/NotificationTagConfigViewModel.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/notificationTagConfig/NotificationTagConfigViewModel.kt index 1cbd30a95..4dd167c0f 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/notificationTagConfig/NotificationTagConfigViewModel.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/notificationTagConfig/NotificationTagConfigViewModel.kt @@ -63,7 +63,8 @@ class NotificationTagConfigViewModel @Inject constructor( _networkUiEvent.value = NetworkUiEvent.Unexpected(eventTagsResult.error.toString()) interestTagsResult is Unexpected -> - _networkUiEvent.value = NetworkUiEvent.Unexpected(interestTagsResult.error.toString()) + _networkUiEvent.value = + NetworkUiEvent.Unexpected(interestTagsResult.error.toString()) eventTagsResult is Failure || interestTagsResult is Failure -> dispatchFetchFailEvent() eventTagsResult is NetworkError || interestTagsResult is NetworkError -> { @@ -93,7 +94,8 @@ class NotificationTagConfigViewModel @Inject constructor( _networkUiEvent.value = NetworkUiEvent.Unexpected(eventTagsResult.error.toString()) interestTagsResult is Unexpected -> - _networkUiEvent.value = NetworkUiEvent.Unexpected(interestTagsResult.error.toString()) + _networkUiEvent.value = + NetworkUiEvent.Unexpected(interestTagsResult.error.toString()) eventTagsResult is Failure || interestTagsResult is Failure -> dispatchFetchFailEvent() eventTagsResult is NetworkError || interestTagsResult is NetworkError -> { diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/setting/SettingFragment.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/setting/SettingFragment.kt index e6514d8d3..a4ed9ee6a 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/setting/SettingFragment.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/setting/SettingFragment.kt @@ -48,7 +48,8 @@ class SettingFragment : { MyCommentsActivity.startActivity(requireContext()) } binding.onNotificationSettingButtonClick = { NotificationConfigActivity.startActivity(requireContext()) } - binding.onBlockMembersButtonClick = { BlockedMembersActivity.startActivity(requireContext()) } + binding.onBlockMembersButtonClick = + { BlockedMembersActivity.startActivity(requireContext()) } binding.onUseTermButtonClick = { UseTermWebViewActivity.startActivity(requireContext()) } binding.onLogoutButtonClick = ::showLogoutConfirmDialog binding.onInquirePageButtonClick = ::navigateToInquirePage diff --git a/android/2023-emmsale/app/src/main/res/drawable/ic_comment_child_comment_arrow.xml b/android/2023-emmsale/app/src/main/res/drawable/ic_comment_child_comment_arrow.xml index 26616955a..649f8a38a 100644 --- a/android/2023-emmsale/app/src/main/res/drawable/ic_comment_child_comment_arrow.xml +++ b/android/2023-emmsale/app/src/main/res/drawable/ic_comment_child_comment_arrow.xml @@ -4,6 +4,6 @@ android:viewportWidth="12" android:viewportHeight="12"> + android:fillColor="#D9D9D9" + android:pathData="M11.354,8.354C11.549,8.158 11.549,7.842 11.354,7.646L8.172,4.464C7.976,4.269 7.66,4.269 7.464,4.464C7.269,4.66 7.269,4.976 7.464,5.172L10.293,8L7.464,10.828C7.269,11.024 7.269,11.34 7.464,11.535C7.66,11.731 7.976,11.731 8.172,11.535L11.354,8.354ZM0.5,0V6H1.5V0H0.5ZM3,8.5H11V7.5H3V8.5ZM0.5,6C0.5,7.381 1.619,8.5 3,8.5V7.5C2.172,7.5 1.5,6.828 1.5,6H0.5Z" /> diff --git a/android/2023-emmsale/app/src/main/res/drawable/ic_editmyprofile_image_edit.xml b/android/2023-emmsale/app/src/main/res/drawable/ic_editmyprofile_image_edit.xml index b1348137d..7019169ff 100644 --- a/android/2023-emmsale/app/src/main/res/drawable/ic_editmyprofile_image_edit.xml +++ b/android/2023-emmsale/app/src/main/res/drawable/ic_editmyprofile_image_edit.xml @@ -4,7 +4,7 @@ android:viewportWidth="18" android:viewportHeight="16"> + android:fillType="evenOdd" + android:pathData="M5.312,1.613C5.54,1.271 5.849,0.99 6.212,0.796C6.575,0.602 6.98,0.5 7.392,0.5H10.608C11.02,0.5 11.425,0.602 11.788,0.796C12.151,0.99 12.46,1.271 12.688,1.613L13.365,2.629C13.441,2.743 13.544,2.837 13.665,2.901C13.786,2.966 13.921,3 14.058,3H14.833C15.497,3 16.132,3.263 16.601,3.732C17.07,4.201 17.333,4.837 17.333,5.5V13C17.333,13.663 17.07,14.299 16.601,14.768C16.132,15.237 15.497,15.5 14.833,15.5H3.167C2.504,15.5 1.868,15.237 1.399,14.768C0.93,14.299 0.667,13.663 0.667,13V5.5C0.667,4.837 0.93,4.201 1.399,3.732C1.868,3.263 2.504,3 3.167,3H3.942C4.079,3 4.214,2.966 4.335,2.901C4.456,2.837 4.559,2.743 4.635,2.629L5.312,1.613ZM7.333,8.833C7.333,8.391 7.509,7.967 7.822,7.655C8.134,7.342 8.558,7.167 9,7.167C9.442,7.167 9.866,7.342 10.179,7.655C10.491,7.967 10.667,8.391 10.667,8.833C10.667,9.275 10.491,9.699 10.179,10.012C9.866,10.324 9.442,10.5 9,10.5C8.558,10.5 8.134,10.324 7.822,10.012C7.509,9.699 7.333,9.275 7.333,8.833ZM9,5.5C8.116,5.5 7.268,5.851 6.643,6.476C6.018,7.101 5.667,7.949 5.667,8.833C5.667,9.717 6.018,10.565 6.643,11.19C7.268,11.816 8.116,12.167 9,12.167C9.884,12.167 10.732,11.816 11.357,11.19C11.982,10.565 12.333,9.717 12.333,8.833C12.333,7.949 11.982,7.101 11.357,6.476C10.732,5.851 9.884,5.5 9,5.5Z" /> diff --git a/android/2023-emmsale/app/src/main/res/drawable/ic_eventdetail_share.xml b/android/2023-emmsale/app/src/main/res/drawable/ic_eventdetail_share.xml new file mode 100644 index 000000000..11da26a7f --- /dev/null +++ b/android/2023-emmsale/app/src/main/res/drawable/ic_eventdetail_share.xml @@ -0,0 +1,9 @@ + + + diff --git a/android/2023-emmsale/app/src/main/res/drawable/ic_profile_education.xml b/android/2023-emmsale/app/src/main/res/drawable/ic_profile_education.xml index 1c974e321..690e3959c 100644 --- a/android/2023-emmsale/app/src/main/res/drawable/ic_profile_education.xml +++ b/android/2023-emmsale/app/src/main/res/drawable/ic_profile_education.xml @@ -4,6 +4,6 @@ android:viewportWidth="12" android:viewportHeight="12"> + android:fillColor="#ffffff" + android:pathData="M11.807,2.693C12.067,2.433 12.067,2 11.807,1.753L10.247,0.193C10,-0.067 9.567,-0.067 9.307,0.193L8.08,1.413L10.58,3.913M0,9.5V12H2.5L9.873,4.62L7.373,2.12L0,9.5Z" /> diff --git a/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_decoration.xml b/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_decoration.xml index 5a95f29a1..44bf8244e 100644 --- a/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_decoration.xml +++ b/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_decoration.xml @@ -3,13 +3,12 @@ android:height="105dp" android:viewportWidth="120" android:viewportHeight="105"> - - - - + + + + diff --git a/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_masking.xml b/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_masking.xml index 32b3cf557..d6aaa342c 100644 --- a/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_masking.xml +++ b/android/2023-emmsale/app/src/main/res/drawable/img_profile_image_masking.xml @@ -6,7 +6,7 @@ + android:fillColor="#000000" + android:pathData="M23.43,38.26C27.99,29.95 29.01,20.39 33.83,12.33C40.42,1.26 52.09,-1.26 64.52,0.76C85.06,4.28 101.04,18.38 112.45,35.24C120.57,47.57 126.66,72.24 105.86,77.02C98.5,78.79 91.91,80.55 85.31,84.32C68.07,94.14 64.01,101.69 51.33,104.46C35.09,107.99 3.64,97.16 0.35,78.79C-2.7,62.93 15.06,53.62 23.43,38.26Z" /> diff --git a/android/2023-emmsale/app/src/main/res/layout-land/activity_event_detail.xml b/android/2023-emmsale/app/src/main/res/layout-land/activity_event_detail.xml index 489a50ca4..8c0fdeea8 100644 --- a/android/2023-emmsale/app/src/main/res/layout-land/activity_event_detail.xml +++ b/android/2023-emmsale/app/src/main/res/layout-land/activity_event_detail.xml @@ -51,23 +51,24 @@ android:id="@+id/tb_eventdetail" android:layout_width="0dp" android:layout_height="56dp" - app:title="@{vm.event.name}" - app:titleTextAppearance="@style/event_detail_toolbar_text_appearance" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="@id/guide_line_center" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:menu="@menu/menu_eventdetail_toolbar" app:navigationIcon="@drawable/ic_all_back" + app:title="@{vm.event.name}" + app:titleTextAppearance="@style/event_detail_toolbar_text_appearance" tools:title="AWS 부산 클라우드데이 2023 AWS" /> + app:layout_constraintTop_toBottomOf="@id/tb_eventdetail"> @@ -221,10 +222,10 @@ android:id="@+id/vp_eventdetail" android:layout_width="0dp" android:layout_height="0dp" - app:layout_constraintStart_toStartOf="@id/guide_line_center" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toBottomOf="@id/tablayout_eventdetail" - app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintStart_toStartOf="@id/guide_line_center" + app:layout_constraintTop_toBottomOf="@id/tablayout_eventdetail" /> + app:visible="@{vm.networkUiState == NetworkUiState.LOADING}" + tools:visibility="gone" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_member_block" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_edit_my_profile.xml b/android/2023-emmsale/app/src/main/res/layout/activity_edit_my_profile.xml index fd7120219..f3e0393ef 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_edit_my_profile.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_edit_my_profile.xml @@ -69,18 +69,16 @@ android:text="@{viewModel.profile.member.name}" android:textSize="17sp" android:textStyle="bold" + app:layout_constraintEnd_toStartOf="@+id/iv_editmyprofile_member_image" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - tools:text="김커디" - app:layout_constraintEnd_toStartOf="@+id/iv_editmyprofile_member_image" /> + tools:text="김커디" /> + tools:ignore="LabelFor" /> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintBottom_toBottomOf="@id/iv_editmyprofile_member_image" + app:layout_constraintEnd_toEndOf="@id/iv_editmyprofile_member_image" /> + app:layout_constraintTop_toBottomOf="@+id/tb_editmyprofile_toolbar" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_editmyprofile_toolbar" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_event_detail.xml b/android/2023-emmsale/app/src/main/res/layout/activity_event_detail.xml index fd349423a..81b92ee1a 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_event_detail.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_event_detail.xml @@ -77,7 +77,9 @@ android:layout_height="56dp" android:background="@color/white" app:layout_collapseMode="pin" + app:menu="@menu/menu_eventdetail_toolbar" app:navigationIcon="@drawable/ic_all_back" /> + diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_feed_writing.xml b/android/2023-emmsale/app/src/main/res/layout/activity_feed_writing.xml index d4550ac99..6ac6eeb64 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_feed_writing.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_feed_writing.xml @@ -37,21 +37,21 @@ android:id="@+id/divider_toolbar_title" android:layout_width="0dp" android:layout_height="wrap_content" - app:layout_constraintStart_toStartOf="parent" + app:layout_constraintBottom_toBottomOf="@id/tb_toolbar" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toBottomOf="@id/tb_toolbar" /> + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintTop_toBottomOf="@+id/et_feed_writing_title" /> + app:layout_constraintTop_toTopOf="parent" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_message_list.xml b/android/2023-emmsale/app/src/main/res/layout/activity_message_list.xml index 3754b679e..c1eba169b 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_message_list.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_message_list.xml @@ -128,12 +128,12 @@ android:layout_width="0dp" android:layout_height="wrap_content" app:hint="@string/messagelist_message_send_hint" - app:submitButtonLabel="@string/messagelist_send_message" app:isSubmitEnabled="@{vm.canSendMessage}" - app:onSubmit="@{(message) -> vm.sendMessage(message)}" app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:onSubmit="@{(message) -> vm.sendMessage(message)}" + app:submitButtonLabel="@string/messagelist_send_message" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_message_list" + app:visible="@{vm.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_message_list" + app:onRefresh="@{() -> vm.refresh()}" + app:visible="@{vm.networkUiState == NetworkUiState.NETWORK_ERROR}" /> \ No newline at end of file diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_my_comments.xml b/android/2023-emmsale/app/src/main/res/layout/activity_my_comments.xml index 979012336..52feb0dec 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_my_comments.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_my_comments.xml @@ -50,21 +50,21 @@ style="?android:attr/progressBarStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="@+id/rv_mycomments_mycomments" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/tb_mycomments_toolbar" /> + app:layout_constraintTop_toBottomOf="@+id/tb_mycomments_toolbar" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_mycomments_toolbar" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_notification_config.xml b/android/2023-emmsale/app/src/main/res/layout/activity_notification_config.xml index 9a5d74390..a3293f9d1 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_notification_config.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_notification_config.xml @@ -167,9 +167,9 @@ android:layout_width="60dp" android:layout_height="32dp" android:layout_marginTop="22dp" - android:onClick="@{() -> onTagAddButtonClick.invoke()}" android:background="@drawable/bg_notificationconfig_add" - android:contentDescription="@string/notificationconfig_add_notification_tag" /> + android:contentDescription="@string/notificationconfig_add_notification_tag" + android:onClick="@{() -> onTagAddButtonClick.invoke()}" /> @@ -236,21 +236,21 @@ style="?android:attr/progressBarStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/tb_notification_config" /> + app:layout_constraintTop_toBottomOf="@id/tb_notification_config" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintTop_toBottomOf="@id/tb_notification_config" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_notification_tag_config.xml b/android/2023-emmsale/app/src/main/res/layout/activity_notification_tag_config.xml index 538f01d94..76f819612 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_notification_tag_config.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_notification_tag_config.xml @@ -69,10 +69,10 @@ android:layout_height="wrap_content" android:layout_marginVertical="17dp" android:background="@drawable/bg_all_two_state_button" + android:enabled="@{viewModel.isChanged}" android:gravity="center" android:onClick="@{() -> viewModel.saveInterestEventTag()}" android:paddingVertical="21dp" - android:enabled="@{viewModel.isChanged}" android:text="@string/notificationtagconfig_register_tag" android:textColor="@color/white" android:textSize="16sp" @@ -85,22 +85,22 @@ + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_notification_tag_config" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_notifications.xml b/android/2023-emmsale/app/src/main/res/layout/activity_notifications.xml index 9f3dcc0e1..896f06b93 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_notifications.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_notifications.xml @@ -44,21 +44,21 @@ + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_notifications" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_notifications" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> \ No newline at end of file diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_onboarding.xml b/android/2023-emmsale/app/src/main/res/layout/activity_onboarding.xml index 1de1efa91..bea9e83b2 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_onboarding.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_onboarding.xml @@ -33,23 +33,23 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:indeterminate="true" - app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintDimensionRatio="0.15" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" tools:visibility="visible" /> + app:layout_constraintTop_toTopOf="parent" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_profile.xml b/android/2023-emmsale/app/src/main/res/layout/activity_profile.xml index 8c89eb645..55639d46f 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_profile.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_profile.xml @@ -75,11 +75,11 @@ android:layout_marginEnd="19dp" android:text="@{viewModel.profile.member.description.isBlank() ? @string/profile_no_description : viewModel.profile.member.description}" android:textSize="13sp" + app:layout_constraintBottom_toTopOf="@+id/view_profile_divider" app:layout_constraintEnd_toStartOf="@+id/iv_profile_memberimage" app:layout_constraintStart_toStartOf="@+id/tv_profile_membername" app:layout_constraintTop_toBottomOf="@+id/tv_profile_membername" - tools:text="가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차" - app:layout_constraintBottom_toTopOf="@+id/view_profile_divider" /> + tools:text="가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차" /> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_profile_toolbar" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_detail.xml b/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_detail.xml index a2059d38a..e4895c67e 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_detail.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_detail.xml @@ -85,10 +85,10 @@ android:layout_marginStart="9dp" android:layout_marginTop="6dp" android:fontFamily="@font/nanum_square_regular" - app:dateText="@{vm.recruitment.recruitment.updatedDate}" - app:dateTimeFormatter="@{DateTimePattern.YEAR_DOT_MONTH_DOT_DAY}" android:textColor="@color/gray" android:textSize="11sp" + app:dateText="@{vm.recruitment.recruitment.updatedDate}" + app:dateTimeFormatter="@{DateTimePattern.YEAR_DOT_MONTH_DOT_DAY}" app:layout_constraintStart_toEndOf="@+id/iv_recruitmentdetail_profile_image" app:layout_constraintTop_toBottomOf="@+id/tv_recruitmentdetail_membername" tools:text="2023.08.03" /> @@ -115,13 +115,13 @@ android:layout_height="40dp" android:layout_marginStart="17dp" android:layout_marginTop="14dp" + android:contentDescription="@string/recruitmentpostdetail_writer_image_description" + android:onClick="@{() -> onProfileImageClick.invoke(vm.recruitment.recruitment.writer.id)}" app:imageUrl="@{vm.recruitment.recruitment.writer.profileImageUrl}" app:isCircle="@{true}" - android:onClick="@{() -> onProfileImageClick.invoke(vm.recruitment.recruitment.writer.id)}" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - tools:srcCompat="@tools:sample/avatars" - android:contentDescription="@string/recruitmentpostdetail_writer_image_description" /> + tools:srcCompat="@tools:sample/avatars" /> @@ -137,34 +137,34 @@ android:clickable="true" android:fontFamily="@font/nanum_square_bold" android:gravity="center" + android:onClick="@{() -> onRequestRecruitmentButtonClick.invoke()}" android:text="@string/recruitmentpostdetail_request_button_text" android:textColor="@color/white" android:textSize="16sp" - android:onClick="@{() -> onRequestRecruitmentButtonClick.invoke()}" - app:visible="@{!vm.recruitment.isMyPost}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + app:visible="@{!vm.recruitment.isMyPost}" /> + app:layout_constraintTop_toTopOf="parent" + app:visible="@{vm.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_toolbar" + app:onRefresh="@{() -> vm.refresh()}" + app:visible="@{vm.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_writing.xml b/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_writing.xml index 6661f7d54..064220bf0 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_writing.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_recruitment_writing.xml @@ -43,12 +43,12 @@ android:layout_marginStart="17dp" android:layout_marginTop="16dp" android:layout_marginEnd="17dp" - android:text="@={vm.content}" android:background="@null" android:gravity="start" android:hint="@string/recruitmentpostwriting_hint_message" android:inputType="textMultiLine" android:maxLength="250" + android:text="@={vm.content}" android:textAppearance="@style/KerdyTextStyleBlackRegular13" android:textColorHint="@color/gray" app:layout_constraintBottom_toBottomOf="parent" @@ -59,10 +59,10 @@ + app:layout_constraintTop_toTopOf="@+id/tb_toolbar" + app:visible="@{vm.networkUiState == NetworkUiState.LOADING}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/activity_splash.xml b/android/2023-emmsale/app/src/main/res/layout/activity_splash.xml index ecb5a6c59..8961c593e 100644 --- a/android/2023-emmsale/app/src/main/res/layout/activity_splash.xml +++ b/android/2023-emmsale/app/src/main/res/layout/activity_splash.xml @@ -1,7 +1,7 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> @@ -13,14 +13,14 @@ tools:context=".presentation.ui.splash.SplashActivity"> + app:layout_constraintTop_toTopOf="parent" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/dialog_recruitmentdetail_send_message.xml b/android/2023-emmsale/app/src/main/res/layout/dialog_recruitmentdetail_send_message.xml index a7742e29b..48d11eafe 100644 --- a/android/2023-emmsale/app/src/main/res/layout/dialog_recruitmentdetail_send_message.xml +++ b/android/2023-emmsale/app/src/main/res/layout/dialog_recruitmentdetail_send_message.xml @@ -60,8 +60,8 @@ android:id="@+id/tv_sendmessagedialog_description" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="13dp" android:layout_marginHorizontal="17dp" + android:layout_marginTop="13dp" android:fontFamily="@font/nanum_square_bold" android:gravity="center" android:text="@{@string/sendmessagedialog_message(vm.recruitment.recruitment.writer.name)}" diff --git a/android/2023-emmsale/app/src/main/res/layout/dialog_send_message.xml b/android/2023-emmsale/app/src/main/res/layout/dialog_send_message.xml index 6d4875345..12039cbc8 100644 --- a/android/2023-emmsale/app/src/main/res/layout/dialog_send_message.xml +++ b/android/2023-emmsale/app/src/main/res/layout/dialog_send_message.xml @@ -61,8 +61,8 @@ android:id="@+id/tv_sendmessagedialog_description" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="13dp" android:layout_marginHorizontal="17dp" + android:layout_marginTop="13dp" android:fontFamily="@font/nanum_square_bold" android:gravity="center" android:text="@{@string/sendmessagedialog_message(vm.profile.member.name)}" diff --git a/android/2023-emmsale/app/src/main/res/layout/fragment_feed_list.xml b/android/2023-emmsale/app/src/main/res/layout/fragment_feed_list.xml index 49c113fab..c1e642ec5 100644 --- a/android/2023-emmsale/app/src/main/res/layout/fragment_feed_list.xml +++ b/android/2023-emmsale/app/src/main/res/layout/fragment_feed_list.xml @@ -47,27 +47,27 @@ + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:onRefresh="@{() -> vm.refresh()}" + app:visible="@{vm.networkUiState == NetworkUiState.NETWORK_ERROR}" /> + app:visible="@{vm.feeds.empty && vm.networkUiState == NetworkUiState.NONE}"> diff --git a/android/2023-emmsale/app/src/main/res/layout/fragment_message_room.xml b/android/2023-emmsale/app/src/main/res/layout/fragment_message_room.xml index 1a07635a3..3ef7674d8 100644 --- a/android/2023-emmsale/app/src/main/res/layout/fragment_message_room.xml +++ b/android/2023-emmsale/app/src/main/res/layout/fragment_message_room.xml @@ -41,13 +41,13 @@ + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_message_room_list" + app:onRefresh="@{() -> vm.refresh()}" + app:visible="@{vm.networkUiState == NetworkUiState.NETWORK_ERROR}" /> + app:layout_constraintTop_toBottomOf="@id/tb_message_room_list" + app:visible="@{vm.networkUiState == NetworkUiState.LOADING}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/fragment_my_profile.xml b/android/2023-emmsale/app/src/main/res/layout/fragment_my_profile.xml index 9b0235f15..0996852ed 100644 --- a/android/2023-emmsale/app/src/main/res/layout/fragment_my_profile.xml +++ b/android/2023-emmsale/app/src/main/res/layout/fragment_my_profile.xml @@ -72,11 +72,11 @@ android:layout_marginEnd="19dp" android:text="@{viewModel.profile.description.isBlank() ? @string/profile_no_description : viewModel.profile.description }" android:textSize="13sp" + app:layout_constraintBottom_toTopOf="@+id/cg_myprofile_fields" app:layout_constraintEnd_toStartOf="@+id/iv_myprofile_member_image" app:layout_constraintStart_toStartOf="@+id/tv_myprofile_membername" app:layout_constraintTop_toBottomOf="@+id/tv_myprofile_membername" - tools:text="안녕하세요 커디입니다." - app:layout_constraintBottom_toTopOf="@+id/cg_myprofile_fields" /> + tools:text="안녕하세요 커디입니다." /> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@+id/tb_myprofile_toolbar" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_myprofile_toolbar" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/fragment_onboarding_club.xml b/android/2023-emmsale/app/src/main/res/layout/fragment_onboarding_club.xml index 35cbaa385..0719eb1b9 100644 --- a/android/2023-emmsale/app/src/main/res/layout/fragment_onboarding_club.xml +++ b/android/2023-emmsale/app/src/main/res/layout/fragment_onboarding_club.xml @@ -24,22 +24,22 @@ android:id="@+id/tb_club_fragment" android:layout_width="0dp" android:layout_height="?attr/actionBarSize" - app:navigationIcon="@drawable/ic_all_back" android:paddingStart="-20dp" android:paddingEnd="-20dp" - app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:navigationIcon="@drawable/ic_all_back" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_club_fragment"> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:navigationIcon="@drawable/ic_all_back" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_education_fragment"> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tb_field_fragment"> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent"> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:onRefresh="@{() -> vm.refresh()}" + app:visible="@{vm.networkUiState == NetworkUiState.NETWORK_ERROR}" /> + app:visible="@{vm.recruitments.empty && vm.networkUiState == NetworkUiState.NONE}"> + app:onRefresh="@{() -> vm.refresh()}" + app:visible="@{vm.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/fragment_setting.xml b/android/2023-emmsale/app/src/main/res/layout/fragment_setting.xml index 1a1e9e12b..c2c0ecdf7 100644 --- a/android/2023-emmsale/app/src/main/res/layout/fragment_setting.xml +++ b/android/2023-emmsale/app/src/main/res/layout/fragment_setting.xml @@ -61,10 +61,10 @@ android:layout_width="65dp" android:layout_height="65dp" android:layout_marginStart="17dp" + android:layout_marginTop="2dp" android:contentDescription="@string/setting_member_image_description" app:imageUrl="@{viewModel.member.profileImageUrl}" app:isCircle="@{true}" - android:layout_marginTop="2dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" tools:srcCompat="@tools:sample/avatars" /> @@ -346,21 +346,21 @@ style="?android:attr/progressBarStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:visible="@{viewModel.networkUiState == NetworkUiState.LOADING}" /> + app:layout_constraintTop_toTopOf="parent" + app:onRefresh="@{() -> viewModel.refresh()}" + app:visible="@{viewModel.networkUiState == NetworkUiState.NETWORK_ERROR}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/item_all_comment.xml b/android/2023-emmsale/app/src/main/res/layout/item_all_comment.xml index 9fd455eba..04f0e0a7a 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_all_comment.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_all_comment.xml @@ -33,31 +33,31 @@ + android:onClick="@{() -> onCommentClick.invoke(uiState.comment)}" + android:paddingHorizontal="17dp"> + app:constraint_referenced_ids="iv_child_comment_arrow_decoration,space_visible_when_child_comment" + app:visible="@{uiState.comment.parentCommentId != null}" /> + app:constraint_referenced_ids="iv_comment_author_image,tv_comment_last_modified_date,iv_comment_menu_button" + app:visible="@{!uiState.comment.deleted}" /> @@ -85,29 +85,29 @@ android:id="@+id/tv_comment_author_name" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:layout_marginTop="@{uiState.comment.deleted ? `19dp` : `14dp`}" android:layout_marginStart="8dp" - app:layout_goneMarginStart="0dp" android:text="@{uiState.comment.deleted ? @string/comment_deleted_comment_author_name : uiState.comment.writer.name}" android:textSize="12sp" android:textStyle="bold" app:layout_constraintStart_toEndOf="@+id/iv_comment_author_image" app:layout_constraintTop_toTopOf="parent" - tools:text="김커디" - tools:layout_marginTop="14dp" /> + app:layout_goneMarginStart="0dp" + app:layout_marginTop="@{uiState.comment.deleted ? `19dp` : `14dp`}" + tools:layout_marginTop="14dp" + tools:text="김커디" /> + app:layout_constraintTop_toBottomOf="@+id/tv_comment_author_name" + tools:text="2023.08.03" /> + app:layout_constraintTop_toTopOf="@+id/tv_comment_last_modified_date" + app:visible="@{uiState.isUpdated && !uiState.comment.deleted}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/item_comment_notification_body.xml b/android/2023-emmsale/app/src/main/res/layout/item_comment_notification_body.xml index b1dbfe4fe..bf8f30b6f 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_comment_notification_body.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_comment_notification_body.xml @@ -88,11 +88,11 @@ android:id="@+id/btn_delete" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginEnd="-6dp" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/notifications_past_notification_delete" - android:padding="6dp" - android:layout_marginEnd="-6dp" android:onClick="@{() -> onDeleteClick.invoke(commentNotification.id)}" + android:padding="6dp" android:src="@drawable/ic_notification_delete" app:layout_constraintBottom_toBottomOf="@+id/tv_comment" app:layout_constraintEnd_toEndOf="parent" diff --git a/android/2023-emmsale/app/src/main/res/layout/item_competition.xml b/android/2023-emmsale/app/src/main/res/layout/item_competition.xml index 005ddda57..d731045dd 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_competition.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_competition.xml @@ -53,10 +53,10 @@ android:layout_marginTop="12dp" android:textSize="13sp" android:textStyle="bold" - app:visible="@{!(event.progressStatus instanceof EventProgressStatus.Ended)}" app:eventApplyingStatus="@{event.applicationStatus}" app:layout_constraintStart_toStartOf="@+id/iv_event_poster" app:layout_constraintTop_toBottomOf="@+id/iv_event_poster" + app:visible="@{!(event.progressStatus instanceof EventProgressStatus.Ended)}" tools:text="D-21" tools:textColor="@color/primary_color" /> @@ -65,11 +65,11 @@ android:layout_width="1dp" android:layout_height="0dp" android:layout_marginStart="6dp" - app:visible="@{!(event.progressStatus instanceof EventProgressStatus.Ended)}" android:background="@color/light_gray" app:layout_constraintBottom_toBottomOf="@+id/tv_application_status" app:layout_constraintStart_toEndOf="@+id/tv_application_status" - app:layout_constraintTop_toTopOf="@+id/tv_application_status" /> + app:layout_constraintTop_toTopOf="@+id/tv_application_status" + app:visible="@{!(event.progressStatus instanceof EventProgressStatus.Ended)}" /> @@ -90,10 +90,10 @@ android:id="@+id/tv_event_name" android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_marginTop="9dp" android:text="@{event.name}" android:textColor="@color/black" android:textSize="15sp" - android:layout_marginTop="9dp" android:textStyle="bold" app:layout_constraintStart_toStartOf="@+id/iv_event_poster" app:layout_constraintTop_toBottomOf="@+id/tv_progress_status" diff --git a/android/2023-emmsale/app/src/main/res/layout/item_feeddetail_feed_detail.xml b/android/2023-emmsale/app/src/main/res/layout/item_feeddetail_feed_detail.xml index 5b07fb3ed..30db875b0 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_feeddetail_feed_detail.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_feeddetail_feed_detail.xml @@ -72,10 +72,10 @@ android:text="@string/all_is_updated" android:textColor="@color/gray" android:textSize="11sp" - app:visible="@{feed.isUpdated}" app:layout_constraintBottom_toBottomOf="@+id/tv_feeddetail_last_modified_date" app:layout_constraintStart_toEndOf="@+id/tv_feeddetail_last_modified_date" - app:layout_constraintTop_toTopOf="@+id/tv_feeddetail_last_modified_date" /> + app:layout_constraintTop_toTopOf="@+id/tv_feeddetail_last_modified_date" + app:visible="@{feed.isUpdated}" /> @@ -99,11 +99,11 @@ android:id="@+id/btn_delete" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginEnd="-6dp" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/notifications_past_notification_delete" android:onClick="@{() -> onDeleteClick.invoke(interestEventNotification.id)}" android:padding="6dp" - android:layout_marginEnd="-6dp" android:src="@drawable/ic_notification_delete" app:layout_constraintBottom_toBottomOf="@+id/tv_comment" app:layout_constraintEnd_toEndOf="parent" diff --git a/android/2023-emmsale/app/src/main/res/layout/item_mycomments_comment.xml b/android/2023-emmsale/app/src/main/res/layout/item_mycomments_comment.xml index 9fa60b575..4d88041af 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_mycomments_comment.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_mycomments_comment.xml @@ -23,8 +23,8 @@ + android:background="?attr/selectableItemBackground" + android:onClick="@{() -> onCommentClick.invoke(comment.feed.id, comment.id)}"> + app:layout_constraintTop_toTopOf="@+id/tv_mycomment_last_modified_date" + app:visible="@{comment.isUpdated}" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/item_other_message.xml b/android/2023-emmsale/app/src/main/res/layout/item_other_message.xml index 88fdc766d..3b7cc7085 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_other_message.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_other_message.xml @@ -65,7 +65,6 @@ android:text="@{message.content}" android:textColor="@color/other_message_text_color" android:textSize="12sp" - app:layout_marginTop="@{message.shownProfile ? @dimen/other_message_with_profile_top_margin : @dimen/other_message_without_profile_top_margin}" app:layout_constrainedWidth="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/tv_chat_time" @@ -73,6 +72,7 @@ app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintStart_toEndOf="@id/iv_member_profile" app:layout_constraintTop_toBottomOf="@id/tv_member_name" + app:layout_marginTop="@{message.shownProfile ? @dimen/other_message_with_profile_top_margin : @dimen/other_message_without_profile_top_margin}" tools:text="저랑 같이 가실래요?" /> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> \ No newline at end of file diff --git a/android/2023-emmsale/app/src/main/res/layout/item_recruitment.xml b/android/2023-emmsale/app/src/main/res/layout/item_recruitment.xml index 0b6e11642..5890774f2 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_recruitment.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_recruitment.xml @@ -37,10 +37,10 @@ android:layout_height="wrap_content" android:layout_marginStart="7dp" android:fontFamily="@font/nanum_square_regular" - app:dateText="@{recruitment.updatedDate}" - app:dateTimeFormatter="@{DateTimePattern.YEAR_DASH_MONTH_DASH_DAY}" android:textColor="@color/gray" android:textSize="11sp" + app:dateText="@{recruitment.updatedDate}" + app:dateTimeFormatter="@{DateTimePattern.YEAR_DASH_MONTH_DASH_DAY}" app:layout_constraintBottom_toBottomOf="@+id/tv_eventrecruitment_membername" app:layout_constraintStart_toEndOf="@+id/tv_eventrecruitment_membername" app:layout_constraintTop_toTopOf="@+id/tv_eventrecruitment_membername" @@ -53,15 +53,15 @@ android:layout_marginStart="17dp" android:layout_marginTop="15dp" android:layout_marginEnd="17dp" + android:layout_marginBottom="16dp" android:ellipsize="end" android:fontFamily="@font/nanum_square_regular" android:maxLines="1" android:text="@{recruitment.content}" android:textSize="13sp" - android:layout_marginBottom="16dp" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/tv_eventrecruitment_membername" tools:text="아무나 같이가실 분 구합니다! 역에서 만나서 같이가면 좋을 것 같아요! 많이들 신청해 주세용!!!" /> diff --git a/android/2023-emmsale/app/src/main/res/layout/item_scrapped_event.xml b/android/2023-emmsale/app/src/main/res/layout/item_scrapped_event.xml index 300cc9069..d2cb9a82a 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_scrapped_event.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_scrapped_event.xml @@ -65,11 +65,11 @@ android:layout_width="1dp" android:layout_height="0dp" android:layout_marginStart="6dp" - app:visible="@{!(event.progressStatus instanceof EventProgressStatus.Ended)}" android:background="@color/light_gray" app:layout_constraintBottom_toBottomOf="@+id/tv_application_status" app:layout_constraintStart_toEndOf="@+id/tv_application_status" - app:layout_constraintTop_toTopOf="@+id/tv_application_status" /> + app:layout_constraintTop_toTopOf="@+id/tv_application_status" + app:visible="@{!(event.progressStatus instanceof EventProgressStatus.Ended)}" /> @@ -90,9 +90,9 @@ android:id="@+id/tv_event_name" android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_marginTop="9dp" android:text="@{event.name}" android:textColor="@color/black" - android:layout_marginTop="9dp" android:textSize="15sp" android:textStyle="bold" app:layout_constraintStart_toStartOf="@+id/iv_event_poster" diff --git a/android/2023-emmsale/app/src/main/res/layout/item_writing_image.xml b/android/2023-emmsale/app/src/main/res/layout/item_writing_image.xml index bcec69521..9cd38d511 100644 --- a/android/2023-emmsale/app/src/main/res/layout/item_writing_image.xml +++ b/android/2023-emmsale/app/src/main/res/layout/item_writing_image.xml @@ -26,12 +26,12 @@ android:id="@+id/iv_item_post_image" android:layout_width="140dp" android:layout_height="140dp" + app:canZoomIn="@{true}" app:imageUrl="@{imageUrl}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:roundedImageRadius="@{10}" - app:canZoomIn="@{true}" tools:src="@drawable/img_all_loading" /> + app:layout_constraintTop_toTopOf="parent" + tools:ignore="LabelFor" /> @@ -63,10 +63,10 @@ android:id="@+id/tv_submit_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingHorizontal="17dp" - android:paddingVertical="13dp" android:enabled="@{!etSubTextInput.text.toString().isBlank() && isSubmitEnabled}" android:onClick="@{() -> onSubmitListener.onSubmit(etSubTextInput.getText().toString())}" + android:paddingHorizontal="17dp" + android:paddingVertical="13dp" android:textColor="@color/all_enable_primary" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> diff --git a/android/2023-emmsale/app/src/main/res/menu/menu_eventdetail_toolbar.xml b/android/2023-emmsale/app/src/main/res/menu/menu_eventdetail_toolbar.xml new file mode 100644 index 000000000..5fb3465f4 --- /dev/null +++ b/android/2023-emmsale/app/src/main/res/menu/menu_eventdetail_toolbar.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/android/2023-emmsale/app/src/main/res/values/strings.xml b/android/2023-emmsale/app/src/main/res/values/strings.xml index df53cb6bd..33717a9cb 100644 --- a/android/2023-emmsale/app/src/main/res/values/strings.xml +++ b/android/2023-emmsale/app/src/main/res/values/strings.xml @@ -73,6 +73,12 @@ %s ~ %s 게시판 + 행사 공유 + 친구로부터 행사를 공유받았어요!\n커디에서 게시글을 구경하고 동행자를 모집해보세요. + 행사 구경하기! + 카카오톡 공유에 실패했어요 🥲 + 지원되는 브라우저가 없어요 🥲 + 3/4 교육 활동 교육 이력이 있나요? diff --git a/android/2023-emmsale/settings.gradle b/android/2023-emmsale/settings.gradle index 66fefb422..1d28ee13a 100644 --- a/android/2023-emmsale/settings.gradle +++ b/android/2023-emmsale/settings.gradle @@ -14,6 +14,7 @@ dependencyResolutionManagement { mavenCentral() jcenter() maven { url "https://jitpack.io" } + maven { url 'https://devrepo.kakao.com/nexus/content/groups/public/' } } } rootProject.name = "Emmsale"