Skip to content

Commit

Permalink
#86 refactor : Extensions 함수 파일명 수정, 파일분리
Browse files Browse the repository at this point in the history
  • Loading branch information
plashdof committed Nov 26, 2023
1 parent ed9835f commit 80ca287
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
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)
}
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)
}

0 comments on commit 80ca287

Please sign in to comment.