-
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/#47] 여행 생성 완료 뷰 구현 #48
Changes from 6 commits
1c3aa02
ae00503
14d21fc
56e53cb
c291f18
ef88518
3716ded
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,57 @@ | ||
package com.going.presentation.starttrip.finishtrip | ||
|
||
import android.content.ClipData | ||
import android.content.ClipboardManager | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.os.Bundle | ||
import androidx.activity.viewModels | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.ActivityFinishTripBinding | ||
import com.going.presentation.preferencetag.PreferenceTagActivity | ||
import com.going.presentation.starttrip.createtrip.CreateTripViewModel | ||
import com.going.ui.base.BaseActivity | ||
import com.going.ui.extension.setOnSingleClickListener | ||
import com.going.ui.extension.toast | ||
|
||
class FinishTripActivity : | ||
BaseActivity<ActivityFinishTripBinding>(R.layout.activity_finish_trip) { | ||
private val viewModel by viewModels<FinishTripViewModel>() | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initCopyCodetvClickListener() | ||
initSendCodeBtnClickListener() | ||
initEnterTripBtnClickListener() | ||
} | ||
|
||
private fun initCopyCodetvClickListener() { | ||
val inviteCode = viewModel.INVITE_CODE | ||
|
||
binding.tvFinishTripTermsText.setOnSingleClickListener { | ||
val clipboardManager = | ||
this.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager | ||
val clipData = ClipData.newPlainText("Invite Code", inviteCode) | ||
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. "Invite Code"는 키값으로 보이는데, 따로 const val로 뺴두는 것이 좋아보여용 |
||
clipboardManager.setPrimaryClip(clipData) | ||
} | ||
} | ||
|
||
private fun initSendCodeBtnClickListener() { | ||
binding.btnFinishTripSendCode.setOnSingleClickListener { | ||
//카카오톡으로 초대코드 보내기 | ||
} | ||
} | ||
|
||
private fun initEnterTripBtnClickListener() { | ||
binding.btnFinishTripEnterTrip.setOnSingleClickListener { | ||
Intent(this, PreferenceTagActivity::class.java).apply { | ||
startActivity(this) | ||
//입장 코드 받아서 보내기 | ||
} | ||
finish() | ||
} | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.going.presentation.starttrip.finishtrip | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class FinishTripViewModel : ViewModel(){ | ||
val INVITE_CODE = "a1b2c3" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="12dp" | ||
android:height="14dp" | ||
android:viewportWidth="12" | ||
android:viewportHeight="14"> | ||
<path | ||
android:pathData="M1,1V11H3V2.3C3,2.134 3.134,2 3.3,2H8V1H1ZM9,2H11.7C11.866,2 12,2.134 12,2.3V13.7C12,13.866 11.866,14 11.7,14H3.3C3.134,14 3,13.866 3,13.7V12H0.3C0.134,12 0,11.866 0,11.7V0.3C0,0.134 0.134,0 0.3,0H8.7C8.866,0 9,0.134 9,0.3V2ZM4,13V3H11V13H4Z" | ||
android:fillColor="#9093A8" | ||
android:fillType="evenOdd"/> | ||
</vector> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<rotate xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:fromDegrees="-90" | ||
android:toDegrees="-90" | ||
android:drawable="@drawable/ic_todo_ticket_left"/> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<rotate xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:fromDegrees="90" | ||
android:toDegrees="90" | ||
android:drawable="@drawable/ic_todo_ticket_left"/> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="40dp" | ||
android:height="24dp" | ||
android:viewportWidth="40" | ||
android:viewportHeight="24"> | ||
<path | ||
android:pathData="M19.89,21.542C17.807,23.084 15.204,24 12.381,24C5.543,24 0,18.627 0,12C0,5.373 5.543,0 12.381,0C15.204,0 17.807,0.916 19.89,2.458C21.996,0.916 24.627,0 27.482,0C34.395,0 39.999,5.373 39.999,12C39.999,18.627 34.395,24 27.482,24C24.627,24 21.996,23.084 19.89,21.542ZM9.63,6.663C10.064,6.856 10.193,7.482 9.918,8.059C9.644,8.637 9.07,8.949 8.637,8.755C8.203,8.562 8.074,7.937 8.348,7.359C8.623,6.781 9.197,6.47 9.63,6.663ZM6.332,7.85C6.607,7.273 6.478,6.647 6.044,6.454C5.611,6.261 5.037,6.572 4.762,7.15C4.488,7.728 4.617,8.353 5.051,8.546C5.484,8.74 6.058,8.428 6.332,7.85ZM6.076,11.228C6.069,11.135 6.14,11.054 6.237,11.046L11.019,10.676C11.115,10.668 11.2,10.738 11.207,10.831L11.211,10.877C11.324,12.25 10.267,13.452 8.85,13.562C7.434,13.672 6.193,12.647 6.08,11.274L6.076,11.228Z" | ||
android:fillColor="#FF4F17" | ||
android:fillType="evenOdd"/> | ||
</vector> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<rotate xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:fromDegrees="90" | ||
android:toDegrees="90" | ||
android:drawable="@drawable/shape_line_gray100_fill_dash_5"/> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
app:layout_constraintTop_toTopOf="parent" | ||
app:navigationIcon="@drawable/ic_back" | ||
app:title="@string/create_trip_tb_title" | ||
app:titleTextColor="@color/black_000" /> | ||
app:titleTextColor="@color/gray_700" /> | ||
|
||
Comment on lines
31
to
33
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. 피그마 반영 좋습니당 |
||
<TextView | ||
android:id="@+id/tv_create_trip_name_title" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
<?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" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<data> | ||
<variable | ||
name="viewModel" | ||
type="com.going.presentation.starttrip.finishtrip.FinishTripViewModel" /> | ||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/gray_50" | ||
tools:context=".starttrip.finishtrip.FinishTripActivity"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/tb_finish_trip" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:background="@color/white_000" | ||
android:elevation="2dp" | ||
android:paddingVertical="12dp" | ||
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. 'z축' 위치를 의미하는데 화면에서 2dp 높이로 떠 있는 것인데 빼는게 맞을 것 같아서 수정하겠습니다 |
||
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. Horizontal_bias가 무슨 기능일까~요? 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" | ||
app:titleTextColor="@color/gray_700" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_name_title" | ||
style="@style/TextAppearance.Doorip.Head3" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="64dp" | ||
android:text="@string/finish_trip_tv_title" | ||
android:textColor="@color/gray_700" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tb_finish_trip" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/layout_finish_trip_ticket" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="28dp" | ||
android:background="@drawable/shape_rect_4_white000_fill" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_finish_trip_name_title"> | ||
|
||
<ImageView | ||
android:id="@+id/iv_finish_trip_icon" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="19dp" | ||
android:src="@drawable/ic_finish_trip_union" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/layout_finish_trip_day_left" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="35dp" | ||
android:layout_marginTop="34dp" | ||
android:background="@drawable/shape_rect_2_red100_fill" | ||
android:visibility="visible" | ||
app:layout_constraintStart_toEndOf="@id/iv_finish_trip_icon" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_deadline" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:paddingVertical="2dp" | ||
android:textAppearance="@style/TextAppearance.Doorip.Detail2.Bold" | ||
android:textColor="@color/red_500" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
android:text="D - " /> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_deadline_day" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginEnd="8dp" | ||
android:paddingVertical="2dp" | ||
android:textAppearance="@style/TextAppearance.Doorip.Detail2.Bold" | ||
android:textColor="@color/red_500" | ||
app:layout_constraintBottom_toBottomOf="@id/tv_finish_trip_deadline" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/tv_finish_trip_deadline" | ||
app:layout_constraintTop_toTopOf="@id/tv_finish_trip_deadline" | ||
android:text="16" /> | ||
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. TextView를 두개 쓰는게 아니라 하나로 합칠 수 있을 것 같네요~ 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. 이후에 서버랑 통신해서 뒤에 남은 날짜(숫자)만 바꿔야해서 이게 더 편할 것 같다고 생각했습니다!! |
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_name" | ||
style="@style/TextAppearance.Doorip.Body1.Bold" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="35dp" | ||
android:layout_marginTop="4dp" | ||
android:text="@string/finish_trip_tv_trip_name" | ||
android:textColor="@color/gray_700" | ||
app:layout_constraintStart_toEndOf="@id/iv_finish_trip_icon" | ||
app:layout_constraintTop_toBottomOf="@id/layout_finish_trip_day_left" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_start" | ||
style="@style/TextAppearance.Doorip.Detail3.Regular" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="35dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="20dp" | ||
android:textColor="@color/gray_300" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/iv_finish_trip_icon" | ||
app:layout_constraintTop_toBottomOf="@id/tv_finish_trip_name" | ||
android:text="2024 .03 .24" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_dash" | ||
Comment on lines
+105
to
+106
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. 요거는 text가 아니라 textView 대신 View를 활용하고, 네이밍도 view로 수정해주셍요 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. 2024 .03 .24 - 라 텍스트 뷰로 고대로 가겠숩니닷 |
||
style="@style/TextAppearance.Doorip.Detail3.Regular" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="2dp" | ||
android:textColor="@color/gray_300" | ||
app:layout_constraintBottom_toBottomOf="@id/tv_finish_trip_start" | ||
app:layout_constraintStart_toEndOf="@id/tv_finish_trip_start" | ||
app:layout_constraintTop_toTopOf="@id/tv_finish_trip_start" | ||
android:text="@string/dashboard_tv_dash" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_date_end" | ||
style="@style/TextAppearance.Doorip.Detail3.Regular" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="2dp" | ||
android:textColor="@color/gray_300" | ||
app:layout_constraintBottom_toBottomOf="@id/tv_finish_trip_dash" | ||
app:layout_constraintStart_toEndOf="@id/tv_finish_trip_dash" | ||
app:layout_constraintTop_toTopOf="@id/tv_finish_trip_dash" | ||
android:text="2024 .03 .31" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_finish_trip_top" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="69dp" | ||
android:layout_marginTop="-11dp" | ||
android:src="@drawable/ic_finish_trip_ticket_top" | ||
app:layout_constraintStart_toStartOf="@id/layout_finish_trip_ticket" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_finish_trip_bottom" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="69dp" | ||
android:layout_marginBottom="-11dp" | ||
android:src="@drawable/ic_finish_trip_ticket_bottom" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="@id/layout_finish_trip_ticket" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
<androidx.appcompat.widget.AppCompatImageView | ||
android:id="@+id/iv_finish_trip_copy" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginEnd="4dp" | ||
android:src="@drawable/ic_finish_trip_copy" | ||
app:layout_constraintBottom_toBottomOf="@id/tv_finish_trip_terms_text" | ||
app:layout_constraintEnd_toStartOf="@id/tv_finish_trip_terms_text" | ||
app:layout_constraintTop_toTopOf="@id/tv_finish_trip_terms_text" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_invite_code" | ||
style="@style/TextAppearance.Doorip.Head4" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="50dp" | ||
android:text="a1b2c3" | ||
android:textColor="@color/gray_700" | ||
app:layout_constraintBottom_toTopOf="@id/iv_finish_trip_copy" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/layout_finish_trip_ticket" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_terms_text" | ||
style="@style/TextAppearance.Doorip.Detail2.Regular" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="40dp" | ||
android:text="@string/finish_trip_tv_copy_code" | ||
android:textColor="@color/gray_300" | ||
app:layout_constraintBottom_toTopOf="@+id/btn_finish_trip_send_code" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/layout_finish_trip_ticket" /> | ||
|
||
<View | ||
android:layout_width="0dp" | ||
android:layout_height="1dp" | ||
android:background="@color/gray_300" | ||
app:layout_constraintEnd_toEndOf="@id/tv_finish_trip_terms_text" | ||
app:layout_constraintStart_toStartOf="@id/iv_finish_trip_copy" | ||
app:layout_constraintTop_toBottomOf="@id/tv_finish_trip_terms_text" /> | ||
|
||
<TextView | ||
android:id="@+id/btn_finish_trip_send_code" | ||
style="@style/TextAppearance.Doorip.Body2.Bold" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginBottom="12dp" | ||
android:background="@drawable/shape_rect_4_white000_fill" | ||
android:gravity="center" | ||
android:paddingVertical="13dp" | ||
android:text="@string/finish_trip_tv_send_code" | ||
android:textColor="@color/gray_500" | ||
app:layout_constraintBottom_toTopOf="@+id/btn_finish_trip_enter_trip" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/btn_finish_trip_enter_trip" | ||
style="@style/TextAppearance.Doorip.Body2.Bold" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginBottom="22dp" | ||
android:background="@drawable/sel_rounded_corner_button" | ||
android:gravity="center" | ||
android:paddingVertical="13dp" | ||
android:text="@string/finish_trip_tv_invite" | ||
android:textColor="@color/white_000" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
</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.
요 친구 한번밖에 안쓰여서 변수로 설정 안하고 그냥 아래에 박아두 될듯 !