-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 매장 관리 화면 구성 및 기능 구현 #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PIYUJIN
wants to merge
13
commits into
develop
Choose a base branch
from
Feat/#30
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f7489a2
[Feat] #30 매장 세부 정보 입력 메인 화면 구성 및 기능 수정사항 반영
PIYUJIN 27527f1
[Feat] #30 매장 관리 - 멤버십 제공 주류 화면 디자인 수정사항 반영
PIYUJIN cd5c7e9
[Feat] #30 매장 관리 - 멤버십 제공 주류 화면 기본 이미지 기능 구현
PIYUJIN edd166e
[Feat] #30 매장 세부 정보 입력 - 매장 정보 화면 토스트 기능 구현
PIYUJIN eaa988e
[Feat] #30 매장 세부 정보 입력 - 매장 정보 화면 디자인 수정사항 반영
PIYUJIN e6f3a67
[Feat] #30 매장 세부 정보 입력 - 매장 정보 화면 디자인 수정사항 반영 및 기능 수정
PIYUJIN 33912bc
[Fix] #30 매장 관리 - 멤버십 제공 주류 화면 기본 주류명 변경
PIYUJIN 88fa2a4
Merge remote-tracking branch 'origin/Feat/#30' into Feat/#30
PIYUJIN b52f9b2
[Fix] #30 매장 관리 - 멤버십 제공 주류 화면 기본 주류 이미지 filePath 변경
PIYUJIN b64d33e
[Delete] 필요없는 코드 삭제
PIYUJIN 8326740
[Fix] #30 dp → px 변환 함수 기능 수정
PIYUJIN ae2c2fc
[Feat] #30 토스트 PopupWindow 메모리 누수 방지 기능 구현
PIYUJIN 6446bcc
[Delete] 사용하지 않는 코드 삭제
PIYUJIN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
63 changes: 63 additions & 0 deletions
63
app/src/main/java/com/project/drinkly_admin/ui/BasicToast.kt
This file contains hidden or 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,63 @@ | ||
| package com.project.drinkly_admin.ui | ||
|
|
||
| import android.content.Context | ||
| import android.content.res.Resources | ||
| import android.view.LayoutInflater | ||
| import android.view.View | ||
| import android.view.ViewGroup | ||
| import android.widget.PopupWindow | ||
| import androidx.databinding.DataBindingUtil | ||
| import com.project.drinkly_admin.R | ||
| import com.project.drinkly_admin.databinding.ToastBasicBinding | ||
| import com.project.drinkly_admin.util.MainUtil.toPx | ||
|
|
||
| object BasicToast { | ||
| fun showBasicToast(context: Context, message: String, icon: Int, anchorView: View) { | ||
| val inflater = LayoutInflater.from(context) | ||
| val binding: ToastBasicBinding = | ||
| DataBindingUtil.inflate(inflater, R.layout.toast_basic, null, false) | ||
|
|
||
| binding.run { | ||
| textViewTooltip.text = message | ||
| imageViewTooltip.setImageResource(icon) | ||
| } | ||
|
|
||
| val screenWidth = Resources.getSystem().displayMetrics.widthPixels | ||
| val marginPx = 20.toPx() | ||
| val popupWidth = screenWidth - marginPx * 2 | ||
|
|
||
| val popupWindow = PopupWindow(binding.root, | ||
| popupWidth, | ||
| ViewGroup.LayoutParams.WRAP_CONTENT, | ||
| false | ||
| ) | ||
|
|
||
| anchorView.post { | ||
| binding.root.measure( | ||
| View.MeasureSpec.UNSPECIFIED, | ||
| View.MeasureSpec.UNSPECIFIED | ||
| ) | ||
| val popupHeight = binding.root.measuredHeight | ||
|
|
||
| val yOffset = -(anchorView.height + popupHeight + 8.toPx()) | ||
|
|
||
| popupWindow.showAsDropDown(anchorView, 0, yOffset) | ||
|
|
||
| // 뷰가 detach될 때 PopupWindow 해제 | ||
| anchorView.addOnAttachStateChangeListener(object : View.OnAttachStateChangeListener { | ||
| override fun onViewAttachedToWindow(v: View) {} | ||
| override fun onViewDetachedFromWindow(v: View) { | ||
| if (popupWindow.isShowing) { | ||
| popupWindow.dismiss() | ||
| } | ||
| } | ||
| }) | ||
|
|
||
| binding.root.postDelayed({ | ||
| if (popupWindow.isShowing) { | ||
| popupWindow.dismiss() | ||
| } | ||
| }, 2000) | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
244 changes: 140 additions & 104 deletions
244
app/src/main/java/com/project/drinkly_admin/ui/store/StoreDetailAvailableDrinksFragment.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <solid android:color="@color/gray3"/> | ||
|
|
||
| <corners | ||
| android:topRightRadius="16dp" | ||
| android:topLeftRadius="16dp"/> | ||
| </shape> |
11 changes: 11 additions & 0 deletions
11
app/src/main/res/drawable/background_white_radius10_stroke_primary30.xml
This file contains hidden or 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,11 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <solid android:color="@color/white"/> | ||
|
|
||
| <stroke | ||
| android:color="@color/primary_30" | ||
| android:width="1dp"/> | ||
|
|
||
| <corners android:radius="10dp"/> | ||
| </shape> |
11 changes: 11 additions & 0 deletions
11
app/src/main/res/drawable/background_white_radius10_stroke_yellow.xml
This file contains hidden or 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,11 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <solid android:color="@color/white"/> | ||
|
|
||
| <stroke | ||
| android:color="@color/yellow" | ||
| android:width="1dp"/> | ||
|
|
||
| <corners android:radius="10dp"/> | ||
| </shape> |
This file contains hidden or 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,7 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <solid android:color="@color/white"/> | ||
|
|
||
| <corners android:radius="12dp"/> | ||
| </shape> |
9 changes: 9 additions & 0 deletions
9
app/src/main/res/drawable/background_white_radius12_bottom.xml
This file contains hidden or 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 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <solid android:color="@color/white"/> | ||
|
|
||
| <corners | ||
| android:bottomRightRadius="12dp" | ||
| android:bottomLeftRadius="12dp"/> | ||
| </shape> |
This file contains hidden or 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,16 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="20dp" | ||
| android:height="20dp" | ||
| android:viewportWidth="20" | ||
| android:viewportHeight="20"> | ||
| <path | ||
| android:pathData="M10,10m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" | ||
| android:fillColor="#5168EC"/> | ||
| <path | ||
| android:pathData="M5,9.543L8.611,13.5L15,6.5" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="1.5" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#ffffff" | ||
| android:strokeLineCap="round"/> | ||
| </vector> |
This file contains hidden or 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,16 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="17dp" | ||
| android:height="16dp" | ||
| android:viewportWidth="17" | ||
| android:viewportHeight="16"> | ||
| <path | ||
| android:strokeWidth="1" | ||
| android:pathData="M8.369,3.563L3.911,3.644C3.131,3.658 2.512,4.338 2.527,5.163L2.661,12.632C2.676,13.458 3.32,14.115 4.099,14.101L11.859,13.961C12.639,13.947 13.258,13.267 13.243,12.442L13.145,6.975" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#71788C" | ||
| android:strokeLineCap="round"/> | ||
| <path | ||
| android:pathData="M14.48,2.262C14.408,2.082 14.304,1.916 14.171,1.774C14.041,1.635 13.884,1.524 13.71,1.447C13.538,1.372 13.353,1.333 13.165,1.333C12.978,1.333 12.792,1.372 12.621,1.447C12.446,1.524 12.289,1.635 12.159,1.774L11.774,2.182L13.786,4.313L14.171,3.904C14.305,3.763 14.41,3.597 14.48,3.416C14.625,3.045 14.625,2.633 14.48,2.262ZM12.789,5.369L10.776,3.237L7.406,6.808C7.356,6.861 7.322,6.927 7.309,6.998L6.931,9.002C6.881,9.263 7.1,9.493 7.346,9.441L9.238,9.041C9.307,9.025 9.37,8.99 9.418,8.938L12.789,5.369Z" | ||
| android:fillColor="#71788C" | ||
| android:fillType="evenOdd"/> | ||
| </vector> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
ImageDatavsCommonImageData중복 – 모델 정리 필요두 데이터 클래스가
image·description을 공유하고CommonImageData에만type필드가 추가되었습니다. 모델 중복은 유지보수 비용을 키우므로 다음을 고려해 주세요.type을 nullable 로 두고 단일ImageData로 통합ui.model패키지로 이동하여 API 요청용 DTO 와 분리또한
image: Any는 타입 안정성이 없습니다.Uri | Int등 실제 사용 타입을 sealed 로 좁히는 편이 안전합니다.빠른 의견 부탁드립니다. 필요하면 리팩터 제안 PR 드리겠습니다.
🏁 Script executed:
Length of output: 6327
중복된 ImageData 모델 통합 및 타입 안전성 확보 필요
공통 필드(image, description)를 갖는 ImageData와 CommonImageData가 중복되어 유지보수 비용이 상승하고 있습니다. 아래 항목을 참고해 리팩터링을 권장합니다.
•
ImageData와CommonImageData를 단일ImageData(image, type?, description)또는 sealed class/인터페이스로 추상화•
image: Any를ImageSource(File/Uri/String 등) 같은 sealed class로 구체화• StoreDetailAvailableDrinksFragment.kt, AvailableDrinkAdapter.kt 등에서 API DTO가 아닌 UI 전용 모델(
ui.model패키지) 사용예시 diff:
ImageSourcesealed class 정의 및 UI-DTO 분리를 통해 명확한 계층 구조를 갖추면 유지보수가 용이해집니다.🤖 Prompt for AI Agents