Skip to content

Commit

Permalink
Template 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdohun0104 committed Oct 7, 2021
1 parent bb21bcb commit 517006b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
5 changes: 1 addition & 4 deletions src/main/resources/templates/ActivityTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import kr.co.finda.finda.databinding.Activity$NAME$Binding
import kr.co.finda.finda.ui.base.BaseActivity
import org.koin.androidx.viewmodel.ext.android.viewModel


class $NAME$Activity : BaseActivityV2<Activity$NAME$Binding, $NAME$ViewModel>(
class $NAME$Activity : BaseActivity<Activity$NAME$Binding, $NAME$ViewModel>(
R.layout.$LAYOUT_NAME$
) {

Expand All @@ -19,10 +18,8 @@ class $NAME$Activity : BaseActivityV2<Activity$NAME$Binding, $NAME$ViewModel>(
}

override fun setupUiComponent() {

}

override fun observeLiveData() {

}
}
15 changes: 12 additions & 3 deletions src/main/resources/templates/BottomSheetTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ package $PACKAGE$
import kr.co.finda.finda.R
import kr.co.finda.finda.databinding.BottomSheet$NAME$Binding
import kr.co.finda.finda.ui.base.BaseBottomSheet
import org.koin.androidx.viewmodel.ext.android.viewModel

class $NAME$BottomSheet : BaseBottomSheet<BottomSheet$NAME$Binding, $NAME$ViewModel>(
R.layout.$LAYOUT_NAME$,
$NAME$ViewModel::class.java
R.layout.$LAYOUT_NAME$
) {

override fun setBindingVariables() {
override val viewModel: $NAME$ViewModel by viewModel()

override fun onInitialize(lifecycleOwner: LifecycleOwner) {
super.onInitialize(lifecycleOwner)
binding.viewModel = viewModel
}

override fun setupUiComponent() {
}

override fun observeLiveData() {
}
}
3 changes: 1 addition & 2 deletions src/main/resources/templates/FragmentTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.koin.androidx.viewmodel.ext.android.sharedViewModel
class $NAME$Fragment : BaseFragment<Fragment$NAME$Binding, $NAME$ViewModel>(
R.layout.$LAYOUT_NAME$
) {

override val viewModel: $NAME$ViewModel by sharedViewModel()

override fun onInitialize(lifecycleOwner: LifecycleOwner) {
Expand All @@ -17,10 +18,8 @@ class $NAME$Fragment : BaseFragment<Fragment$NAME$Binding, $NAME$ViewModel>(
}

override fun setupUiComponent() {

}

override fun observeLiveData() {

}
}
3 changes: 1 addition & 2 deletions src/main/resources/templates/ViewModelTestTemplate.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package $PACKAGE$

import kr.co.finda.BasicTest
import kr.co.finda.finda.coretest.BasicTest
import org.junit.jupiter.api.BeforeEach

class $NAME$ViewModelTest : BasicTest() {
Expand All @@ -12,5 +12,4 @@ class $NAME$ViewModelTest : BasicTest() {

viewModel = $NAME$ViewModel()
}

}

0 comments on commit 517006b

Please sign in to comment.