-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/default-button
- Loading branch information
Showing
11 changed files
with
89 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Create new issue | ||
about: 새로운 이슈를 등록합니다! | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### 배경 | ||
- 본 이슈를 등록하게 된 이유를 설명합니다.(AS-IS, TO-BE) | ||
|
||
### 내용 | ||
- 본 이슈의 목표를 구체적으로 어떻게 달성할 것인가에 대해 설명합니다. |
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 @@ | ||
### 내용 | ||
- 본 PR이 어떤 기능에 대한 작업인지, 이슈를 참조하여 간략하게 설명합니다. | ||
|
||
### 작업 사항 | ||
- 변경된 코드에 대해 다른 사람들이 빠르게 구조 및 내용을 이해할 수 있도록 간략하게 설명합니다. | ||
|
||
### 변경 전 VS 변경 후 | ||
|변경 전|변경 후| | ||
|---|---| | ||
|<img src="" width="300" />|<img src="" width="300" />| | ||
|
||
### 참고 |
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
2 changes: 2 additions & 0 deletions
2
app/src/main/java/com/moyerun/moyeorun_android/MoyeoRunApplication.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
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/moyerun/moyeorun_android/common/extension/ActivityExtension.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,8 @@ | ||
package com.moyerun.moyeorun_android.common.extension | ||
|
||
import android.app.Activity | ||
import android.widget.Toast | ||
|
||
fun Activity.toast(msg: String, isShort: Boolean = true) { | ||
Toast.makeText(this, msg, if (isShort) Toast.LENGTH_SHORT else Toast.LENGTH_LONG).show() | ||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/moyerun/moyeorun_android/common/extension/FragmentExtension.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,8 @@ | ||
package com.moyerun.moyeorun_android.common.extension | ||
|
||
import android.widget.Toast | ||
import androidx.fragment.app.Fragment | ||
|
||
fun Fragment.toast(msg: String, isShort: Boolean = false) { | ||
Toast.makeText(context, msg, if (isShort) Toast.LENGTH_SHORT else Toast.LENGTH_LONG).show() | ||
} |
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/moyerun/moyeorun_android/common/extension/ViewExtension.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,19 @@ | ||
package com.moyerun.moyeorun_android.common.extension | ||
|
||
import android.view.View | ||
|
||
fun View.setOnDebounceClickListener(interval: Long = 1000L, action: (View?) -> Unit) { | ||
val debounceClickListener = object : View.OnClickListener { | ||
private var lastClickedMillis = 0L | ||
|
||
override fun onClick(view: View?) { | ||
val now = System.currentTimeMillis() | ||
if (now - lastClickedMillis < interval) { | ||
return | ||
} | ||
lastClickedMillis = now | ||
action.invoke(view) | ||
} | ||
} | ||
setOnClickListener(debounceClickListener) | ||
} |
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