-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FEAT/#346] 재구독 연장 여부 공지 팝업 뷰 구현
- Loading branch information
Showing
28 changed files
with
493 additions
and
123 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
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
75 changes: 75 additions & 0 deletions
75
app/src/main/java/com/el/yello/presentation/pay/PayReSubsNoticeDialog.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,75 @@ | ||
package com.el.yello.presentation.pay | ||
|
||
import android.content.Intent | ||
import android.graphics.Color | ||
import android.graphics.drawable.ColorDrawable | ||
import android.os.Bundle | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import android.view.WindowManager | ||
import com.el.yello.R | ||
import com.el.yello.databinding.FragmentNoticeResubscribeBinding | ||
import com.example.ui.base.BindingDialogFragment | ||
import com.example.ui.view.setOnSingleClickListener | ||
|
||
class PayReSubsNoticeDialog : | ||
BindingDialogFragment<FragmentNoticeResubscribeBinding>(R.layout.fragment_notice_resubscribe) { | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
setNoticeBtnClickListener() | ||
getArgExpiredDate() | ||
} | ||
|
||
override fun onStart() { | ||
super.onStart() | ||
showDialogFullScreen() | ||
} | ||
|
||
private fun showDialogFullScreen() { | ||
dialog?.window?.setLayout( | ||
ViewGroup.LayoutParams.MATCH_PARENT, | ||
ViewGroup.LayoutParams.MATCH_PARENT, | ||
) | ||
dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) | ||
dialog?.window?.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND) | ||
} | ||
|
||
private fun setNoticeBtnClickListener() { | ||
binding.btnNoticeQuit.setOnSingleClickListener { | ||
dismiss() | ||
} | ||
binding.btnYelloplusSubscribe.setOnSingleClickListener { | ||
Intent(requireContext(), PayActivity::class.java).apply { | ||
startActivity(this) | ||
} | ||
dismiss() | ||
} | ||
} | ||
|
||
private fun setExpiredDate(expiredDate: String) { | ||
if (isAdded) { | ||
binding.tvResubscribeExpiredDate.text = expiredDate | ||
} | ||
} | ||
|
||
private fun getArgExpiredDate() { | ||
val expiredDate = arguments?.getString(ARG_EXPIRED_DATE) | ||
expiredDate?.let { | ||
setExpiredDate(it) | ||
} | ||
} | ||
|
||
companion object { | ||
private const val ARG_EXPIRED_DATE = "arg_expired_date" | ||
|
||
@JvmStatic | ||
fun newInstance(expiredDate: String): PayReSubsNoticeDialog { | ||
return PayReSubsNoticeDialog().apply { | ||
arguments = Bundle().apply { | ||
putString(ARG_EXPIRED_DATE, expiredDate) | ||
} | ||
} | ||
} | ||
} | ||
} |
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,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:pathData="M12,12m12,0a12,12 0,1 0,-24 0a12,12 0,1 0,24 0" | ||
android:fillColor="#FBFF3E"/> | ||
<path | ||
android:pathData="M14.034,6.818V17H12.493V8.359H12.433L9.997,9.95V8.479L12.537,6.818H14.034Z" | ||
android:fillColor="#191919"/> | ||
</vector> |
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,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:pathData="M12,12m12,0a12,12 0,1 0,-24 0a12,12 0,1 0,24 0" | ||
android:fillColor="#FBFF3E"/> | ||
<path | ||
android:pathData="M12.012,17.139C11.33,17.139 10.72,17.021 10.183,16.786C9.649,16.551 9.227,16.224 8.915,15.807C8.607,15.386 8.441,14.899 8.418,14.345H9.979C9.999,14.647 10.1,14.909 10.282,15.131C10.468,15.349 10.71,15.519 11.008,15.638C11.307,15.757 11.638,15.817 12.002,15.817C12.403,15.817 12.758,15.747 13.066,15.608C13.378,15.469 13.622,15.275 13.797,15.026C13.973,14.774 14.061,14.484 14.061,14.156C14.061,13.815 13.973,13.515 13.797,13.256C13.625,12.995 13.371,12.789 13.037,12.64C12.705,12.491 12.304,12.416 11.833,12.416H10.973V11.163H11.833C12.211,11.163 12.543,11.095 12.828,10.96C13.116,10.824 13.342,10.635 13.504,10.393C13.666,10.148 13.748,9.861 13.748,9.533C13.748,9.218 13.676,8.944 13.534,8.712C13.394,8.477 13.196,8.293 12.937,8.161C12.682,8.028 12.38,7.962 12.032,7.962C11.701,7.962 11.391,8.023 11.103,8.146C10.818,8.265 10.586,8.437 10.407,8.663C10.228,8.885 10.132,9.152 10.118,9.463H8.632C8.648,8.913 8.811,8.429 9.119,8.011C9.431,7.594 9.842,7.267 10.352,7.032C10.862,6.797 11.429,6.679 12.052,6.679C12.705,6.679 13.269,6.807 13.743,7.062C14.22,7.314 14.588,7.65 14.846,8.071C15.108,8.492 15.237,8.953 15.234,9.453C15.237,10.023 15.078,10.507 14.757,10.905C14.439,11.303 14.014,11.569 13.484,11.705V11.785C14.16,11.887 14.684,12.156 15.055,12.59C15.43,13.024 15.615,13.563 15.612,14.206C15.615,14.766 15.459,15.268 15.144,15.712C14.833,16.156 14.407,16.506 13.867,16.761C13.327,17.013 12.708,17.139 12.012,17.139Z" | ||
android:fillColor="#191919"/> | ||
</vector> |
Oops, something went wrong.