Skip to content

Commit

Permalink
#6 onboarding/온보딩 화면 : 로그인 - 온보딩 뷰페이저 화면 📰
Browse files Browse the repository at this point in the history
- 가이드 화면 파일 네이밍
  • Loading branch information
likppi10 committed Jul 30, 2022
1 parent 8ecf16c commit 81a2a83
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AnimationAdapter(var guideImgaeList: List<Int>, var guideTextList: List<St
}

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AnimationViewHolder {
var view = LayoutInflater.from(parent.context).inflate(R.layout.list_item_icon, parent, false)
var view = LayoutInflater.from(parent.context).inflate(R.layout.list_item_guide, parent, false)
return AnimationViewHolder(view)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.ftw.hometerview.R
import com.ftw.hometerview.adapter.AnimationAdapter
import com.ftw.hometerview.databinding.ActivityLoginBinding
import com.ftw.hometerview.ui.main.MainActivity
import com.ftw.hometerview.ui.onboarding.OnboardingActivity
import com.kakao.sdk.auth.model.OAuthToken
import com.kakao.sdk.common.model.ClientError
import com.kakao.sdk.common.model.ClientErrorCause
Expand All @@ -31,12 +32,12 @@ class LoginActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

guideSetting()


binding = ActivityLoginBinding.inflate(layoutInflater)
setContentView(binding.root)

guideSetting()

binding.kakaoLoginButton.setOnClickListener {
kakaoLogin()
}
Expand Down Expand Up @@ -82,7 +83,7 @@ class LoginActivity : AppCompatActivity() {
UserApiClient.instance.loginWithKakaoAccount(this, callback = callback)
} else if (token != null) {
Log.i(TAG, "카카오톡으로 로그인 성공 token = ${token.accessToken}")
startActivity(Intent(this, MainActivity::class.java))
startActivity(Intent(this, OnboardingActivity::class.java))
}
}
} else {
Expand Down
32 changes: 18 additions & 14 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.main.MainActivity">
xmlns:tools="http://schemas.android.com/tools">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="이곳은 카카오 로그인 후 넘어온 메인 액티비티입니다."
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.main.MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="이곳은 카카오 로그인 후 넘어온 메인 액티비티입니다."
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

</layout>

</androidx.constraintlayout.widget.ConstraintLayout>
File renamed without changes.

0 comments on commit 81a2a83

Please sign in to comment.