Skip to content

Commit

Permalink
[FEAT] dialogFragment 활용을 위해 createSuggestionActivity appCompatActivi…
Browse files Browse the repository at this point in the history
…ty 상속 (#204)
  • Loading branch information
915dbfl committed Feb 13, 2024
1 parent d8b8ad0 commit 27429f6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,36 @@ package com.lgtm.android.mission_suggestion.ui.create_suggestion

import androidx.activity.viewModels
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import com.lgtm.android.common_ui.base.BaseComposeActivity
import com.lgtm.android.common_ui.base.BaseActivity
import com.lgtm.android.mission_suggestion.R
import com.lgtm.android.mission_suggestion.databinding.ActivityCreateSuggestionBinding
import com.lgtm.android.mission_suggestion.ui.create_suggestion.presentation.CreateSuggestionScreen
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class CreateSuggestionActivity: BaseComposeActivity() {
class CreateSuggestionActivity: BaseActivity<ActivityCreateSuggestionBinding>(R.layout.activity_create_suggestion) {
private val createSuggestionViewModel by viewModels<CreateSuggestionViewModel>()
override fun initializeViewModel() {
viewModel = createSuggestionViewModel
}

@Composable
override fun Content() {
MaterialTheme {
CreateSuggestionScreen {
setBackButtonClick()
override fun onResume() {
super.onResume()
setComposableContent()
}

private fun setComposableContent() {
binding.composeView.setContent {
MaterialTheme {
CreateSuggestionScreen {
setBackButtonClick()
}
}
}
}

private fun setBackButtonClick() {
finish()
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.compose.ui.platform.ComposeView
android:id="@+id/composeView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

</layout>

0 comments on commit 27429f6

Please sign in to comment.