Skip to content
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

Merged
merged 9 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
android:exported="false"
android:screenOrientation="portrait" />


<activity
android:name="com.going.presentation.tendencytest.TendencyTestSplashActivity"
android:exported="false"
Expand All @@ -88,10 +89,16 @@
android:screenOrientation="portrait" />

<activity
android:name="com.going.presentation.createtrip.CreateTripActivity"
android:name="com.going.presentation.starttrip.createtrip.CreateTripActivity"
android:exported="false"
android:screenOrientation="portrait"/>

<activity
android:name="com.going.presentation.starttrip.StartTripSplashActivity"
android:exported="false"
android:screenOrientation="portrait"/>


</application>

</manifest>
4 changes: 3 additions & 1 deletion presentation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>


</manifest>
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()
}
}
Comment on lines +20 to +27
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니당~!


private fun initEnterTripBtnClickListener() {
binding.btnStartTripSplashEnterTrip.setOnSingleClickListener {
//초대 코드 받아서 여행 입장하는 액티비티로 연결
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.going.presentation.createtrip
package com.going.presentation.starttrip.createtrip

import android.os.Bundle
import android.view.View
Expand Down
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

Expand All @@ -20,6 +22,7 @@ class CreateTripActivity :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

initBackBtnClickListener()
initBindingViewModel()
observeIsNameAvailable()
observeCheckStartDateAvailable()
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 앞으로 Intent는 이렇게 해야겠어욤

}
}
private fun initBindingViewModel() {
binding.viewModel = viewModel
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.going.presentation.createtrip
package com.going.presentation.starttrip.createtrip

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
Expand Down
4 changes: 2 additions & 2 deletions presentation/src/main/res/layout/activity_create_trip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<data>
<variable
name="viewModel"
type="com.going.presentation.createtrip.CreateTripViewModel" />
type="com.going.presentation.starttrip.createtrip.CreateTripViewModel" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white_000"
tools:context=".createtrip.CreateTripActivity">
tools:context=".starttrip.createtrip.CreateTripActivity">

<androidx.appcompat.widget.Toolbar
android:id="@+id/tb_create_trip"
Expand Down
83 changes: 83 additions & 0 deletions presentation/src/main/res/layout/activity_start_trip_splash.xml
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 잘못 들어간듯 !

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마진이 뭔가 이상한디요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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"
Copy link
Member

Choose a reason for hiding this comment

The 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>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<variable
name="viewModel"
type="com.going.presentation.createtrip.CreateTripViewModel" />
type="com.going.presentation.starttrip.createtrip.CreateTripViewModel" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
Expand Down
7 changes: 6 additions & 1 deletion presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<string name="name_blank_error">이름에는 공백만 입력할 수 없어요</string>

<string name="sign_in_tv_title">여행을 시작해보세요</string>
<string name="sign_in_tv_terms">개인정보처리방침</string>
<string name="sign_in_tv_terms"><u>개인정보처리방침</u></string>

<string name="counter">%1$d/%2$d</string>

Expand Down Expand Up @@ -84,4 +84,9 @@
<string name="menu_our_todo">우리의 투두</string>
<string name="menu_my_todo">나의 투두</string>

<!--start_trip_splash-->
<string name="start_trip_splash_title">여행을 시작해보세요.</string>
<string name="start_trip_splash_btn_new_trip">새로운 여행 시작하기</string>
<string name="start_trip_splash_btn_enter_trip">여행 입장하기</string>

</resources>