Skip to content
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

Fix/etc #523

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package com.mashup.ui.webview.birthday
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.KeyEvent
import androidx.activity.ComponentActivity
import androidx.activity.compose.BackHandler
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
Expand Down Expand Up @@ -42,15 +42,18 @@ class BirthdayActivity : ComponentActivity() {
),
isShowMashUpToolbar = false
)

BackHandler {
finish()
}
}
}
setFullScreen()
}

override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK) {
finish()
return true
}
return super.onKeyDown(keyCode, event)
}
companion object {
fun newIntent(context: Context): Intent = Intent(context, BirthdayActivity::class.java).apply {
putExtra(EXTRA_TITLE_KEY, "birthday")
Expand Down
Loading