Skip to content

Commit

Permalink
#6 onboarding/온보딩 화면 : 디자인 포맷 설정 📰
Browse files Browse the repository at this point in the history
- rough_ui에서 가져온 커밋 conflict 해결
  • Loading branch information
likppi10 committed Aug 1, 2022
1 parent d565d3b commit f3dd063
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.os.Bundle
import com.bumptech.glide.Glide
import com.ftw.hometerview.R
import com.ftw.hometerview.databinding.ActivityLoadingBinding
import com.ftw.hometerview.ui.main.MainActivity

class LoadingActivity : AppCompatActivity() {

Expand All @@ -24,7 +25,11 @@ class LoadingActivity : AppCompatActivity() {
binding = ActivityLoadingBinding.inflate(layoutInflater)
setContentView(binding.root)

Glide.with(this).load(R.raw.loading).into(binding.loadView);
Glide.with(this).load(R.raw.loading).into(binding.loadView)

binding.loadView.setOnClickListener {
startActivity(MainActivity.newIntent(this))
}
}

}
19 changes: 1 addition & 18 deletions app/src/main/java/com/ftw/hometerview/ui/main/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Parcelable
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import com.ftw.hometerview.R
import kotlinx.parcelize.Parcelize
import com.ftw.hometerview.databinding.ActivityMainBinding
import com.ftw.hometerview.ui.main.favorite.FavoriteFragment
import com.ftw.hometerview.ui.main.home.HomeFragment
Expand All @@ -25,18 +23,11 @@ import kotlinx.coroutines.launch
class MainActivity : AppCompatActivity() {

companion object {
val ARGUMENT_KEY = "ARGUMENT_KEY"
fun newIntent(context: Context, a: String, b: Int): Intent {
fun newIntent(context: Context): Intent {
return Intent(context, MainActivity::class.java)
.putExtra(ARGUMENT_KEY, Argument(a, b))
}
}


companion object {
fun newIntent(context: Context): Intent = Intent(context, MainActivity::class.java)
}

@Inject
lateinit var viewModel: MainViewModel

Expand All @@ -48,9 +39,6 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

intent.getParcelableExtra<Argument>(ARGUMENT_KEY)?.let {

} ?: finish()

DataBindingUtil.setContentView<ActivityMainBinding>(this, R.layout.activity_main)
.apply {
Expand Down Expand Up @@ -80,9 +68,4 @@ class MainActivity : AppCompatActivity() {
.commitAllowingStateLoss()
}

@Parcelize
private data class Argument(
val a: String,
val b: Int
) : Parcelable
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.ftw.hometerview.R
import com.ftw.hometerview.ui.main.MainActivity
import com.ftw.hometerview.ui.onboardingresult.OnboardingResultActivity
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
import kotlinx.coroutines.launch
Expand Down

0 comments on commit f3dd063

Please sign in to comment.