-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UI/#37] 여행 입장 스플래시 구현 #46
Changes from 8 commits
aca089f
037286a
9061ac1
f9819e3
ec13ec0
606ce71
ca00107
e76cd69
6426cdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.going.presentation.starttrip | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.ActivityStartTripSplashBinding | ||
import com.going.presentation.starttrip.createtrip.CreateTripActivity | ||
import com.going.ui.base.BaseActivity | ||
import com.going.ui.extension.setOnSingleClickListener | ||
|
||
class StartTripSplashActivity : | ||
BaseActivity<ActivityStartTripSplashBinding>(R.layout.activity_start_trip_splash) { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initNewTripBtnClickListener() | ||
initEnterTripBtnClickListener() | ||
} | ||
|
||
private fun initNewTripBtnClickListener() { | ||
binding.btnStartTripSplashNewTrip.setOnSingleClickListener { | ||
Intent(this, CreateTripActivity::class.java).apply { | ||
startActivity(this) | ||
} | ||
finish() | ||
} | ||
} | ||
|
||
private fun initEnterTripBtnClickListener() { | ||
binding.btnStartTripSplashEnterTrip.setOnSingleClickListener { | ||
//초대 코드 받아서 여행 입장하는 액티비티로 연결 | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package com.going.presentation.createtrip | ||
package com.going.presentation.starttrip.createtrip | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import android.widget.TextView | ||
import androidx.activity.viewModels | ||
import androidx.core.content.res.ResourcesCompat | ||
import com.going.domain.entity.NameState | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.ActivityCreateTripBinding | ||
import com.going.presentation.starttrip.StartTripSplashActivity | ||
import com.going.ui.base.BaseActivity | ||
import com.going.ui.extension.setOnSingleClickListener | ||
|
||
|
@@ -20,6 +22,7 @@ class CreateTripActivity : | |
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initBackBtnClickListener() | ||
initBindingViewModel() | ||
observeIsNameAvailable() | ||
observeCheckStartDateAvailable() | ||
|
@@ -29,6 +32,14 @@ class CreateTripActivity : | |
initNextBtnClickListener() | ||
} | ||
|
||
private fun initBackBtnClickListener(){ | ||
binding.tbCreateTrip.setNavigationOnClickListener() { | ||
Intent(this, StartTripSplashActivity::class.java).apply { | ||
startActivity(this) | ||
} | ||
finish() | ||
Comment on lines
+37
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 저도 앞으로 Intent는 이렇게 해야겠어욤 |
||
} | ||
} | ||
private fun initBindingViewModel() { | ||
binding.viewModel = viewModel | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<data> | ||
|
||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/white_000"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/tb_start_trip_splash" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:background="@color/white_000" | ||
android:elevation="2dp" | ||
android:paddingVertical="12dp" | ||
android:paddingStart="18dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 요거 잘못 들어간듯 ! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 수정했습니당 |
||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:navigationIcon="@drawable/ic_back" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_start_trip_splash_title" | ||
style="@style/TextAppearance.Doorip.Head3" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="212dp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 마진이 뭔가 이상한디요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 수정했습니답 |
||
android:gravity="center" | ||
android:text="@string/start_trip_splash_title" | ||
android:textColor="@color/gray_700" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_start_trip_splash" | ||
android:layout_width="200dp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이미지뷰는 wrap_content로 작성해주세요 ~ |
||
android:layout_height="126dp" | ||
android:layout_marginTop="25dp" | ||
android:src="@drawable/img_sign_in_main" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_start_trip_splash_title" /> | ||
|
||
<TextView | ||
android:id="@+id/btn_start_trip_splash_new_trip" | ||
style="@style/TextAppearance.Doorip.Body2.Bold" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="166dp" | ||
android:background="@drawable/shape_rect_4_gray200_line" | ||
android:gravity="center" | ||
android:paddingVertical="13dp" | ||
android:text="@string/start_trip_splash_btn_new_trip" | ||
android:textColor="@color/gray_500" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/iv_start_trip_splash" /> | ||
|
||
<TextView | ||
android:id="@+id/btn_start_trip_splash_enter_trip" | ||
style="@style/TextAppearance.Doorip.Body2.Bold" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="12dp" | ||
android:background="@drawable/sel_rounded_corner_button" | ||
android:gravity="center" | ||
android:paddingVertical="13dp" | ||
android:text="@string/start_trip_splash_btn_enter_trip" | ||
android:textColor="@color/white_000" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/btn_start_trip_splash_new_trip" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니당~!