forked from yy0ung/nibobnebob
-
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.
#86 refactor : Extensions 함수 파일명 수정, 파일분리
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/DataExtensions.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,13 @@ | ||
package com.avengers.nibobnebob.presentation.ui | ||
|
||
import java.text.SimpleDateFormat | ||
import java.util.Date | ||
import java.util.Locale | ||
import java.util.TimeZone | ||
|
||
internal fun Long.toDateString(): String { | ||
val dateFormat = SimpleDateFormat("yyyy/MM/dd", Locale.getDefault()) | ||
dateFormat.timeZone = TimeZone.getTimeZone("UTC") | ||
val date = Date(this) | ||
return dateFormat.format(date) | ||
} |
4 changes: 2 additions & 2 deletions
4
...obnebob/presentation/util/HideKeyBoard.kt → ...ibobnebob/presentation/ui/UiExtensions.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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package com.avengers.nibobnebob.presentation.util | ||
package com.avengers.nibobnebob.presentation.ui | ||
|
||
import android.content.Context | ||
import android.view.View | ||
import android.view.inputmethod.InputMethodManager | ||
|
||
fun Context.hideKeyboard(view: View) { | ||
internal fun Context.hideKeyboard(view: View) { | ||
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | ||
imm.hideSoftInputFromWindow(view.windowToken, 0) | ||
} |