Skip to content

Commit

Permalink
#6 remain_ui/남은 ui : 로그인 화면
Browse files Browse the repository at this point in the history
 - 온보딩 이미지 추가
 - ui 배치 변경
  • Loading branch information
likppi10 committed Sep 12, 2022
1 parent e78be9c commit 2ba8928
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.ftw.hometerview.R
class AnimationAdapter(var guideImgaeList: List<Int>, var guideTextList: List<String>) : RecyclerView.Adapter<AnimationAdapter.AnimationViewHolder>() {

inner class AnimationViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
var imageViewIcon = itemView.findViewById<ImageView>(R.id.imageView_icon)
var imageViewIcon = itemView.findViewById<ImageView>(R.id.onboarding_icon_imageview)
var guideText = itemView.findViewById<TextView>(R.id.guide_text)

fun onBind(res: Int, text: String) {
Expand All @@ -31,4 +31,4 @@ class AnimationAdapter(var guideImgaeList: List<Int>, var guideTextList: List<St

override fun getItemCount(): Int = guideImgaeList.size

}
}
10 changes: 3 additions & 7 deletions app/src/main/java/com/ftw/hometerview/ui/login/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LoginActivity : AppCompatActivity() {

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

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

Expand All @@ -47,13 +47,11 @@ class LoginActivity : AppCompatActivity() {
binding.kakaoLoginButton.setOnClickListener {
kakaoLogin()
}

}

private fun guideSetting() {

// 가이드에 사용 될 이미지, 문구
val guideImgaeList = listOf(R.drawable.icon1, R.drawable.icon2, R.drawable.icon3)
// 가이드에 사용 될 이미지, 문구
val guideImgaeList = listOf(R.drawable.onboarding1, R.drawable.onboarding2)
val guideTextList = listOf(getString(R.string.guide_text1), getString(R.string.guide_text2), getString(R.string.guide_text3))

binding.guideViewpager.setPageTransformer { page, position ->
Expand Down Expand Up @@ -90,12 +88,10 @@ class LoginActivity : AppCompatActivity() {
} else if (token != null) {
Log.i(TAG, "카카오톡으로 로그인 성공 token = ${token.accessToken}")
startActivity(SearchCompanyActivity.newIntent(this))

}
}
} else {
UserApiClient.instance.loginWithKakaoAccount(this, callback = callback)
}
}

}
Binary file added app/src/main/res/drawable-v24/onboarding1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-v24/onboarding2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions app/src/main/res/layout/list_item_guide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
>

<ImageView
android:id="@+id/imageView_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/onboarding_icon_imageview"
android:layout_width="@dimen/dp_size_240"
android:layout_height="@dimen/dp_size_240"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/guide_text"
app:srcCompat="@drawable/icon1"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/onboarding1"
/>

<TextView
Expand All @@ -26,10 +26,10 @@
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="@dimen/guide_text_size"
app:layout_constraintBottom_toTopOf="@+id/imageView_icon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@+id/onboarding_icon_imageview"
/>

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 2ba8928

Please sign in to comment.