-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI/#47] ์ฌํ ์์ฑ ์๋ฃ ๋ทฐ ๊ตฌํ
- Loading branch information
Showing
14 changed files
with
355 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
presentation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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.ui.base.BaseActivity | ||
import com.going.ui.extension.setOnSingleClickListener | ||
|
||
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() | ||
//checkDayLeft() | ||
} | ||
|
||
private fun initCopyCodetvClickListener() { | ||
binding.tvFinishTripTermsText.setOnSingleClickListener { | ||
val clipboardManager = | ||
this.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager | ||
val clipData = ClipData.newPlainText("INVITE_CODE_LABEL", viewModel.INVITE_CODE) | ||
clipboardManager.setPrimaryClip(clipData) | ||
} | ||
} | ||
|
||
private fun initSendCodeBtnClickListener() { | ||
binding.btnFinishTripSendCode.setOnSingleClickListener { | ||
//์นด์นด์คํก์ผ๋ก ์ด๋์ฝ๋ ๋ณด๋ด๊ธฐ | ||
} | ||
} | ||
|
||
private fun initEnterTripBtnClickListener() { | ||
binding.btnFinishTripEnterTrip.setOnSingleClickListener { | ||
Intent(this, PreferenceTagActivity::class.java).apply { | ||
startActivity(this) | ||
//์ ์ฅ ์ฝ๋ ๋ฐ์์ ๋ณด๋ด๊ธฐ | ||
} | ||
finish() | ||
} | ||
} | ||
|
||
// private fun checkDayLeft(){ | ||
// ๊ทธ ์ ๋ทฐ์์ ์๋ฒ ๋ถ์ฌ์ ๋ณด๋ด์ฃผ๋ day ๊ฐ ์๊ฒ ๋๋ฉด ๋ง๊ฒ ๋ก์ง ๊ตฌํํ๊ฒ ์ต๋๋ค | ||
// if(dayLeft > 0) { | ||
// binding.tvFinishTripDayLeft.text = dayLeft | ||
// }else{ | ||
// binding.tvFinishTripDayLeft.text = | ||
// } | ||
// } | ||
companion object { | ||
const val INVITE_CODE_LABEL = "Invite Code" | ||
} | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
...entation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.going.presentation.starttrip.finishtrip | ||
|
||
import androidx.lifecycle.ViewModel | ||
|
||
class FinishTripViewModel : ViewModel(){ | ||
val INVITE_CODE = "a1b2c3" | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
presentation/src/main/res/drawable/ic_finish_trip_copy.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
5 changes: 5 additions & 0 deletions
5
presentation/src/main/res/drawable/ic_finish_trip_ticket_bottom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"/> |
5 changes: 5 additions & 0 deletions
5
presentation/src/main/res/drawable/ic_finish_trip_ticket_top.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"/> |
10 changes: 10 additions & 0 deletions
10
presentation/src/main/res/drawable/ic_finish_trip_union.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
presentation/src/main/res/drawable/shape_line_gray100_fill_dash_5_vertical.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
228 changes: 228 additions & 0 deletions
228
presentation/src/main/res/layout/activity_finish_trip.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
<?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:paddingVertical="12dp" | ||
android:paddingStart="18dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
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" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_finish_trip_day_left" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="35dp" | ||
android:layout_marginTop="34dp" | ||
android:paddingHorizontal="8dp" | ||
android:paddingVertical="2dp" | ||
android:background="@drawable/shape_rect_2_red100_fill" | ||
android:text="D - 16" | ||
android:textColor="@color/red_500" | ||
android:textAppearance="@style/TextAppearance.Doorip.Detail2.Bold" | ||
app:layout_constraintStart_toEndOf="@id/iv_finish_trip_icon" | ||
app:layout_constraintTop_toTopOf="parent"/> | ||
|
||
<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/tv_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" | ||
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.