diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/OneWayAirplaneListAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/OneWayAirplaneListAdapter.kt similarity index 97% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/OneWayAirplaneListAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/OneWayAirplaneListAdapter.kt index 7841d73a..8ea503c7 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/OneWayAirplaneListAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/OneWayAirplaneListAdapter.kt @@ -1,4 +1,4 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.booking.airplane import android.content.Context import android.util.Log @@ -6,7 +6,7 @@ import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.project.how.R -import com.project.how.data_class.dto.GetOneWayFlightOffersResponseElement +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersResponseElement import com.project.how.databinding.OneWayAirplaneListItemBinding import java.text.NumberFormat import java.time.LocalDateTime diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentAirplaneAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/RecentAirplaneAdapter.kt similarity index 97% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentAirplaneAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/RecentAirplaneAdapter.kt index c999f229..7c22447f 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentAirplaneAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/RecentAirplaneAdapter.kt @@ -1,4 +1,4 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.booking.airplane import android.view.LayoutInflater import android.view.ViewGroup diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RoundTripAirplaneListAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/RoundTripAirplaneListAdapter.kt similarity index 97% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RoundTripAirplaneListAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/RoundTripAirplaneListAdapter.kt index 72e43edc..fe3ebfa6 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RoundTripAirplaneListAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/airplane/RoundTripAirplaneListAdapter.kt @@ -1,4 +1,4 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.booking.airplane import android.content.Context import android.util.Log @@ -6,7 +6,7 @@ import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.project.how.R -import com.project.how.data_class.dto.GetFlightOffersResponseElement +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersResponseElement import com.project.how.databinding.RoundTripAirplaneListItemBinding import java.text.NumberFormat import java.time.LocalDateTime diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentHotelAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/hotel/RecentHotelAdapter.kt similarity index 96% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentHotelAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/hotel/RecentHotelAdapter.kt index c167218a..067961e3 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentHotelAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/booking/hotel/RecentHotelAdapter.kt @@ -1,11 +1,10 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.booking.hotel import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide import com.project.how.BuildConfig -import com.project.how.R import com.project.how.data_class.recyclerview.RecentHotel import com.project.how.databinding.RecentHotelItemBinding diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/AiDaysScheduleAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/AiDaysScheduleAdapter.kt similarity index 91% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/AiDaysScheduleAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/AiDaysScheduleAdapter.kt index f056f88f..33716be8 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/AiDaysScheduleAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/AiDaysScheduleAdapter.kt @@ -1,5 +1,6 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.schedule +import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -8,13 +9,14 @@ import com.project.how.R import com.project.how.data_class.recyclerview.AiDaysSchedule import com.project.how.databinding.AiDaysScheduleItemBinding -class AiDaysScheduleAdapter(data: List) +class AiDaysScheduleAdapter(private val context: Context, data: List) : RecyclerView.Adapter(){ private var dailySchedule = data inner class ViewHolder(val binding: AiDaysScheduleItemBinding) : RecyclerView.ViewHolder(binding.root){ fun bind(data : AiDaysSchedule, position: Int){ binding.scheduleTitle.text = data.places + binding.budget.text = context.getString(R.string.budget, data.budget.toString()) when (position) { 0 -> binding.topDottedLine.visibility = View.GONE dailySchedule.lastIndex -> binding.bottomDottedLine.visibility = View.GONE diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/AiScheduleAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/AiScheduleAdapter.kt similarity index 95% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/AiScheduleAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/AiScheduleAdapter.kt index d21b910d..4cc61fe7 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/AiScheduleAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/AiScheduleAdapter.kt @@ -1,4 +1,4 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.schedule import android.content.Context import android.util.Log @@ -35,6 +35,7 @@ class AiScheduleAdapter(private val context: Context, data : List, p inner class ViewHolder(val binding : AiScheduleItemBinding) : RecyclerView.ViewHolder(binding.root){ fun bind(data : AiSchedule, position: Int){ binding.title.text = data.title + binding.budget.text = context.getString(R.string.total_budget, data.budget.toString()) binding.places.text = getPlacesText(data.places) Glide.with(binding.root) .load(data.image) @@ -47,7 +48,7 @@ class AiScheduleAdapter(private val context: Context, data : List, p binding.daysTitle.text = context.getString(R.string.days_title, (1).toString(), getDaysTitle(data, 0)) - val adapter = AiDaysScheduleAdapter(data.dailySchedule[selectedDay]) + val adapter = AiDaysScheduleAdapter(context, data.dailySchedule[selectedDay]) binding.daySchedules.adapter = adapter binding.drawer.setOnClickListener { diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/CalendarListAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/CalendarListAdapter.kt similarity index 93% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/CalendarListAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/CalendarListAdapter.kt index ab64b8f6..3e0a6821 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/CalendarListAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/CalendarListAdapter.kt @@ -1,4 +1,4 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.schedule import android.content.Context import android.util.Log @@ -7,11 +7,10 @@ import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide -import com.google.android.gms.maps.model.LatLng import com.project.how.BuildConfig import com.project.how.R -import com.project.how.data_class.dto.GetScheduleListResponse -import com.project.how.data_class.dto.GetScheduleListResponseElement +import com.project.how.data_class.dto.schedule.GetScheduleListResponse +import com.project.how.data_class.dto.schedule.GetScheduleListResponseElement import com.project.how.databinding.CalendarListItemBinding import java.text.NumberFormat import java.util.Locale diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/DaysScheduleAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/DaysScheduleAdapter.kt similarity index 98% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/DaysScheduleAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/DaysScheduleAdapter.kt index ab776062..cc155138 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/DaysScheduleAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/DaysScheduleAdapter.kt @@ -1,4 +1,4 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.schedule import android.content.Context import android.view.LayoutInflater diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/DaysScheduleEditAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/DaysScheduleEditAdapter.kt similarity index 99% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/DaysScheduleEditAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/DaysScheduleEditAdapter.kt index 7b125866..7320cc80 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/DaysScheduleEditAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/DaysScheduleEditAdapter.kt @@ -1,4 +1,4 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.schedule import android.content.Context import android.util.Log diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentAddedCalendarsAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/RecentAddedCalendarsAdapter.kt similarity index 90% rename from android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentAddedCalendarsAdapter.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/RecentAddedCalendarsAdapter.kt index 98d99647..5c32d050 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/RecentAddedCalendarsAdapter.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/schedule/RecentAddedCalendarsAdapter.kt @@ -1,12 +1,12 @@ -package com.project.how.adapter.recyclerview +package com.project.how.adapter.recyclerview.schedule import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide import com.project.how.BuildConfig -import com.project.how.data_class.dto.GetLatestSchedulesResponse -import com.project.how.data_class.dto.GetLatestSchedulesResponseElement +import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponseElement import com.project.how.databinding.RecentAddedCalendarsItemBinding class RecentAddedCalendarsAdapter(data : GetLatestSchedulesResponse, private val onItemClickListener: OnItemClickListener) : RecyclerView.Adapter() { diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/weather/WeekWeatherAdapter.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/weather/WeekWeatherAdapter.kt new file mode 100644 index 00000000..1e051d68 --- /dev/null +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/adapter/recyclerview/weather/WeekWeatherAdapter.kt @@ -0,0 +1,41 @@ +package com.project.how.adapter.recyclerview.weather + +import android.view.LayoutInflater +import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView +import com.bumptech.glide.Glide +import com.project.how.R +import com.project.how.data_class.dto.weather.GetWeeklyWeathersResponseElement +import com.project.how.databinding.WeekWeatherItemBinding + +class WeekWeatherAdapter(private val data : List) + : RecyclerView.Adapter() { + + inner class ViewHolder(val binding: WeekWeatherItemBinding) : RecyclerView.ViewHolder(binding.root){ + fun bind(data: GetWeeklyWeathersResponseElement){ + binding.week.text = data.date + binding.temp.text = data.temp + Glide.with(binding.root) + .load(data.iconUrl) + .error(R.drawable.icon_question) + .into(binding.image) + } + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder = ViewHolder( + WeekWeatherItemBinding.inflate( + LayoutInflater.from(parent.context), + parent, + false + ) + ) + + override fun getItemViewType(position: Int): Int = position + override fun getItemCount(): Int = data.size + + override fun onBindViewHolder(holder: ViewHolder, position: Int) { + val data = data[position] + holder.bind(data) + } + +} \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GenerateSkyscannerUrlRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GenerateSkyscannerUrlRequest.kt similarity index 95% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GenerateSkyscannerUrlRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GenerateSkyscannerUrlRequest.kt index 3e1dfa29..12bba4de 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GenerateSkyscannerUrlRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GenerateSkyscannerUrlRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.booking.airplane import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GenerateSkyscannerUrlResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GenerateSkyscannerUrlResponse.kt similarity index 73% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GenerateSkyscannerUrlResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GenerateSkyscannerUrlResponse.kt index 770aba87..e25bfbe8 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GenerateSkyscannerUrlResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GenerateSkyscannerUrlResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.booking.airplane import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFlightOffersRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetFlightOffersRequest.kt similarity index 95% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFlightOffersRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetFlightOffersRequest.kt index 38655bb3..b0302abd 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFlightOffersRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetFlightOffersRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.booking.airplane import com.google.gson.annotations.SerializedName import java.io.Serializable diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFlightOffersResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetFlightOffersResponse.kt similarity index 95% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFlightOffersResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetFlightOffersResponse.kt index 053e9edc..8c415edc 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFlightOffersResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetFlightOffersResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.booking.airplane import java.io.Serializable diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetLikeFlightResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetLikeFlightResponse.kt similarity index 90% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetLikeFlightResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetLikeFlightResponse.kt index ab55b32c..0162a412 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetLikeFlightResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/GetLikeFlightResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.booking.airplane typealias GetLikeFlightResponse = List diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LikeFlight.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/LikeFlight.kt similarity index 89% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LikeFlight.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/LikeFlight.kt index 06bd1722..297dcba0 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LikeFlight.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/LikeFlight.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.booking.airplane typealias LikeFlight = List diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LikeOneWayFlight.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/LikeOneWayFlight.kt similarity index 87% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LikeOneWayFlight.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/LikeOneWayFlight.kt index c77a443f..9a92417c 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LikeOneWayFlight.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/booking/airplane/LikeOneWayFlight.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.booking.airplane typealias LikeOneWayFlight = List diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetCountryLocationRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/country/GetCountryLocationRequest.kt similarity index 75% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetCountryLocationRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/country/GetCountryLocationRequest.kt index 7b2090cd..8a1ef160 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetCountryLocationRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/country/GetCountryLocationRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.country import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetCountryLocationResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/country/GetCountryLocationResponse.kt similarity index 80% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetCountryLocationResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/country/GetCountryLocationResponse.kt index 12a1d374..e0d07799 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetCountryLocationResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/country/GetCountryLocationResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.country import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/AuthRecreateRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/AuthRecreateRequest.kt similarity index 76% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/AuthRecreateRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/AuthRecreateRequest.kt index 0b3365f4..67d08d04 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/AuthRecreateRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/AuthRecreateRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.member import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetInfoResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/GetInfoResponse.kt similarity index 85% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetInfoResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/GetInfoResponse.kt index 2359be4c..c48d9cf4 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetInfoResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/GetInfoResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.member import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LoginRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/LoginRequest.kt similarity index 72% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LoginRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/LoginRequest.kt index d890cb60..b9ef2a83 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/LoginRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/LoginRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.member import com.google.gson.annotations.SerializedName data class LoginRequest ( diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/SignUpRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/SignUpRequest.kt similarity index 83% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/SignUpRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/SignUpRequest.kt index 0a76791c..d1d916e7 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/SignUpRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/member/SignUpRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.member import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleListRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleListRequest.kt similarity index 91% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleListRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleListRequest.kt index 745b1105..4dc9bba7 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleListRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleListRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.schedule import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleRequest.kt similarity index 87% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleRequest.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleRequest.kt index 26e8eb26..97dac854 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleRequest.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleRequest.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.schedule import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleResponse.kt similarity index 94% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleResponse.kt index d68c1433..3908a531 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/CreateScheduleResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/CreateScheduleResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.schedule import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFastestSchedulesResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetFastestSchedulesResponse.kt similarity index 77% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFastestSchedulesResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetFastestSchedulesResponse.kt index c97d7449..0f98623d 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetFastestSchedulesResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetFastestSchedulesResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.schedule data class GetFastestSchedulesResponse( val id: Long, diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetLatestScheduleResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetLatestScheduleResponse.kt similarity index 84% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetLatestScheduleResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetLatestScheduleResponse.kt index 5d910577..65a47bd3 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetLatestScheduleResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetLatestScheduleResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.schedule typealias GetLatestSchedulesResponse = List diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetScheduleListResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetScheduleListResponse.kt similarity index 93% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetScheduleListResponse.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetScheduleListResponse.kt index aaad2ee6..9d8797e7 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/GetScheduleListResponse.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/GetScheduleListResponse.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.schedule import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/ScheduleDetail.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/ScheduleDetail.kt similarity index 94% rename from android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/ScheduleDetail.kt rename to android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/ScheduleDetail.kt index 287f5183..17d204ad 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/ScheduleDetail.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/schedule/ScheduleDetail.kt @@ -1,4 +1,4 @@ -package com.project.how.data_class.dto +package com.project.how.data_class.dto.schedule import com.google.gson.annotations.SerializedName diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/weather/GetWeathersRequest.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/weather/GetWeathersRequest.kt new file mode 100644 index 00000000..c115a1cd --- /dev/null +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/weather/GetWeathersRequest.kt @@ -0,0 +1,8 @@ +package com.project.how.data_class.dto.weather + +import com.google.gson.annotations.SerializedName + +data class GetWeathersRequest( + @SerializedName("country") + val country : String +) diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/weather/GetWeeklyWeathersResponse.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/weather/GetWeeklyWeathersResponse.kt new file mode 100644 index 00000000..f23b90ec --- /dev/null +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/dto/weather/GetWeeklyWeathersResponse.kt @@ -0,0 +1,14 @@ +package com.project.how.data_class.dto.weather + +import com.google.gson.annotations.SerializedName + +typealias GetWeeklyWeathersResponse = ArrayList + +data class GetWeeklyWeathersResponseElement ( + @SerializedName("date") + val date: String, + @SerializedName("temp") + val temp: String, + @SerializedName("iconUrl") + val iconUrl: String +) diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/recyclerview/AiSchedule.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/recyclerview/AiSchedule.kt index 128371fc..4e926893 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/recyclerview/AiSchedule.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/data_class/recyclerview/AiSchedule.kt @@ -9,6 +9,7 @@ data class AiScheduleList( data class AiSchedule( val title: String, val country: String, + val budget : Long = 0, val places: List, val image: String, val startDate: String, @@ -19,6 +20,7 @@ data class AiSchedule( data class AiDaysSchedule( val type : Int, val todo: String, + val budget : Long, val places: String, val lat : Double, val lng : Double diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/model/BookingRepository.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/model/BookingRepository.kt index d44d1dd3..036bde4e 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/model/BookingRepository.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/model/BookingRepository.kt @@ -3,12 +3,11 @@ package com.project.how.model import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData -import com.project.how.data_class.dto.GetFlightOffersResponse -import com.project.how.data_class.dto.GetLikeFlightResponse -import com.project.how.data_class.dto.GetOneWayFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.GetLikeFlightResponse +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersResponse import com.project.how.data_class.roomdb.RecentAirplane import com.project.how.roomdb.dao.RecentAirplaneDao -import java.util.LinkedList import javax.inject.Inject import javax.inject.Singleton diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/model/ScheduleRepository.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/model/ScheduleRepository.kt index abf3b9d7..1bb70761 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/model/ScheduleRepository.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/model/ScheduleRepository.kt @@ -5,15 +5,15 @@ import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import com.project.how.R -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter -import com.project.how.data_class.dto.GetFastestSchedulesResponse -import com.project.how.data_class.dto.GetLatestSchedulesResponse +import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter +import com.project.how.data_class.dto.schedule.GetFastestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponse import com.project.how.data_class.recyclerview.AiDaysSchedule import com.project.how.data_class.recyclerview.AiSchedule import com.project.how.data_class.recyclerview.DaysSchedule import com.project.how.data_class.recyclerview.Schedule -import com.project.how.data_class.dto.GetScheduleListResponse -import com.project.how.data_class.dto.ScheduleDetail +import com.project.how.data_class.dto.schedule.GetScheduleListResponse +import com.project.how.data_class.dto.schedule.ScheduleDetail import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow import java.time.LocalDate diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/BookingService.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/BookingService.kt index dd12590b..57047110 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/BookingService.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/BookingService.kt @@ -1,17 +1,16 @@ package com.project.how.network.api_interface import com.project.how.data_class.dto.EmptyResponse -import com.project.how.data_class.dto.GenerateOneWaySkyscannerUrlRequest -import com.project.how.data_class.dto.GenerateSkyscannerUrlRequest -import com.project.how.data_class.dto.GenerateSkyscannerUrlResponse -import com.project.how.data_class.dto.GetFlightOffersRequest -import com.project.how.data_class.dto.GetFlightOffersResponse -import com.project.how.data_class.dto.GetLikeFlightResponse -import com.project.how.data_class.dto.GetOneWayFlightOffersRequest -import com.project.how.data_class.dto.GetOneWayFlightOffersResponse -import com.project.how.data_class.dto.LikeFlightElement -import com.project.how.data_class.dto.LikeFlight -import com.project.how.data_class.dto.LikeOneWayFlightElement +import com.project.how.data_class.dto.booking.airplane.GenerateOneWaySkyscannerUrlRequest +import com.project.how.data_class.dto.booking.airplane.GenerateSkyscannerUrlRequest +import com.project.how.data_class.dto.booking.airplane.GenerateSkyscannerUrlResponse +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.GetLikeFlightResponse +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.LikeFlightElement +import com.project.how.data_class.dto.booking.airplane.LikeOneWayFlightElement import retrofit2.http.Body import retrofit2.http.DELETE import retrofit2.http.GET diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/MemberService.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/MemberService.kt index 87d0aac6..0c781552 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/MemberService.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/MemberService.kt @@ -1,10 +1,10 @@ package com.project.how.network.api_interface import com.project.how.data_class.dto.EmptyResponse -import com.project.how.data_class.dto.LoginRequest -import com.project.how.data_class.dto.SignUpRequest -import com.project.how.data_class.dto.AuthRecreateRequest -import com.project.how.data_class.dto.GetInfoResponse +import com.project.how.data_class.dto.member.LoginRequest +import com.project.how.data_class.dto.member.SignUpRequest +import com.project.how.data_class.dto.member.AuthRecreateRequest +import com.project.how.data_class.dto.member.GetInfoResponse import retrofit2.Call import retrofit2.http.Body import retrofit2.http.GET diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/ScheduleService.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/ScheduleService.kt index 5eb87967..618b6799 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/ScheduleService.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/network/api_interface/ScheduleService.kt @@ -1,14 +1,14 @@ package com.project.how.network.api_interface -import com.project.how.data_class.dto.CreateScheduleListRequest -import com.project.how.data_class.dto.CreateScheduleListResponse -import com.project.how.data_class.dto.CreateScheduleResponse -import com.project.how.data_class.dto.GetCountryLocationRequest -import com.project.how.data_class.dto.GetCountryLocationResponse -import com.project.how.data_class.dto.GetFastestSchedulesResponse -import com.project.how.data_class.dto.GetLatestSchedulesResponse -import com.project.how.data_class.dto.GetScheduleListResponse -import com.project.how.data_class.dto.ScheduleDetail +import com.project.how.data_class.dto.schedule.CreateScheduleListRequest +import com.project.how.data_class.dto.schedule.CreateScheduleListResponse +import com.project.how.data_class.dto.schedule.CreateScheduleResponse +import com.project.how.data_class.dto.country.GetCountryLocationRequest +import com.project.how.data_class.dto.country.GetCountryLocationResponse +import com.project.how.data_class.dto.schedule.GetFastestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetScheduleListResponse +import com.project.how.data_class.dto.schedule.ScheduleDetail import retrofit2.Call import retrofit2.http.Body import retrofit2.http.DELETE diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/LoginActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/LoginActivity.kt index ebeaf5c3..1e9556a1 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/LoginActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/LoginActivity.kt @@ -16,7 +16,7 @@ import com.google.android.gms.auth.api.signin.GoogleSignInClient import com.google.android.gms.auth.api.signin.GoogleSignInOptions import com.project.how.BuildConfig import com.project.how.R -import com.project.how.data_class.dto.LoginRequest +import com.project.how.data_class.dto.member.LoginRequest import com.project.how.databinding.ActivityLoginBinding import com.project.how.view_model.MemberViewModel import kotlinx.coroutines.launch diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AddAICalendarActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AddAICalendarActivity.kt index 2f434fd5..7fec087f 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AddAICalendarActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AddAICalendarActivity.kt @@ -7,7 +7,6 @@ import android.util.Log import android.view.View import android.widget.Toast import androidx.activity.viewModels -import androidx.core.util.Pair import androidx.databinding.DataBindingUtil import androidx.lifecycle.lifecycleScope import com.google.android.gms.ads.AdRequest @@ -16,9 +15,8 @@ import com.google.android.material.datepicker.CalendarConstraints import com.google.android.material.datepicker.MaterialDatePicker import com.project.how.R import com.project.how.data_class.recyclerview.AiSchedule -import com.project.how.data_class.AiScheduleInput import com.project.how.data_class.AiScheduleListInput -import com.project.how.data_class.dto.GetCountryLocationResponse +import com.project.how.data_class.dto.country.GetCountryLocationResponse import com.project.how.data_class.recyclerview.AiScheduleList import com.project.how.databinding.ActivityAddAicalendarBinding import com.project.how.interface_af.OnAddListener @@ -35,7 +33,6 @@ import com.project.how.view.dialog.bottom_sheet_dialog.PurposeBottomSheetDialog import com.project.how.view.dialog.bottom_sheet_dialog.ActivityBottomSheetDialog import com.project.how.view_model.AiScheduleViewModel import com.project.how.view_model.ScheduleViewModel -import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.launch import java.text.SimpleDateFormat import java.util.Calendar diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AiScheduleListActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AiScheduleListActivity.kt index 4a525d41..58216096 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AiScheduleListActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ai/AiScheduleListActivity.kt @@ -6,7 +6,7 @@ import android.os.Bundle import android.util.Log import androidx.databinding.DataBindingUtil import com.project.how.R -import com.project.how.adapter.recyclerview.AiScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.AiScheduleAdapter import com.project.how.data_class.recyclerview.AiSchedule import com.project.how.data_class.recyclerview.AiScheduleList import com.project.how.databinding.ActivityAiScheduleListBinding diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarActivity.kt index d14848a8..8286ff9a 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarActivity.kt @@ -18,8 +18,7 @@ import com.google.android.gms.maps.model.LatLng import com.google.android.gms.maps.model.PolylineOptions import com.google.android.material.tabs.TabLayout import com.project.how.R -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter -import com.project.how.adapter.recyclerview.DaysScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.DaysScheduleAdapter import com.project.how.data_class.recyclerview.DaysSchedule import com.project.how.data_class.recyclerview.Schedule import com.project.how.databinding.ActivityCalendarBinding diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarEditActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarEditActivity.kt index bfbf2447..83496adb 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarEditActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarEditActivity.kt @@ -24,9 +24,9 @@ import com.google.android.material.datepicker.CalendarConstraints import com.google.android.material.datepicker.MaterialDatePicker import com.google.android.material.tabs.TabLayout import com.project.how.R -import com.project.how.adapter.recyclerview.DaysScheduleEditAdapter +import com.project.how.adapter.recyclerview.schedule.DaysScheduleEditAdapter import com.project.how.adapter.item_touch_helper.RecyclerViewItemTouchHelperCallback -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter import com.project.how.data_class.recyclerview.AiSchedule import com.project.how.data_class.recyclerview.DaysSchedule import com.project.how.data_class.recyclerview.Schedule diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarListActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarListActivity.kt index c6c22ffb..a1795c26 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarListActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/calendar/CalendarListActivity.kt @@ -11,10 +11,10 @@ import androidx.lifecycle.lifecycleScope import com.google.android.material.datepicker.CalendarConstraints import com.google.android.material.datepicker.MaterialDatePicker import com.project.how.R -import com.project.how.adapter.recyclerview.CalendarListAdapter -import com.project.how.data_class.dto.GetCountryLocationResponse +import com.project.how.adapter.recyclerview.schedule.CalendarListAdapter +import com.project.how.data_class.dto.country.GetCountryLocationResponse import com.project.how.data_class.recyclerview.Schedule -import com.project.how.data_class.dto.GetScheduleListResponseElement +import com.project.how.data_class.dto.schedule.GetScheduleListResponseElement import com.project.how.databinding.ActivityCalendarListBinding import com.project.how.interface_af.OnDesListener import com.project.how.interface_af.OnYesOrNoListener diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/OneWayAirplaneListActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/OneWayAirplaneListActivity.kt index d84a9bc4..b740e2d0 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/OneWayAirplaneListActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/OneWayAirplaneListActivity.kt @@ -9,12 +9,12 @@ import androidx.lifecycle.lifecycleScope import com.google.android.gms.ads.AdRequest import com.google.android.gms.ads.MobileAds import com.project.how.R -import com.project.how.adapter.recyclerview.OneWayAirplaneListAdapter -import com.project.how.data_class.dto.GenerateOneWaySkyscannerUrlRequest -import com.project.how.data_class.dto.GetOneWayFlightOffersRequest -import com.project.how.data_class.dto.GetOneWayFlightOffersResponseElement -import com.project.how.data_class.dto.LikeOneWayFlightElement -import com.project.how.data_class.dto.OneWayFlightOffers +import com.project.how.adapter.recyclerview.booking.airplane.OneWayAirplaneListAdapter +import com.project.how.data_class.dto.booking.airplane.GenerateOneWaySkyscannerUrlRequest +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersResponseElement +import com.project.how.data_class.dto.booking.airplane.LikeOneWayFlightElement +import com.project.how.data_class.dto.booking.airplane.OneWayFlightOffers import com.project.how.data_class.roomdb.RecentAirplane import com.project.how.databinding.ActivityOneWayAirplaneListBinding import com.project.how.view.activity.calendar.CalendarEditActivity diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/RoundTripAirplaneListActivity.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/RoundTripAirplaneListActivity.kt index 5b403c9b..0c8f5c88 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/RoundTripAirplaneListActivity.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/activity/ticket/RoundTripAirplaneListActivity.kt @@ -10,13 +10,12 @@ import androidx.lifecycle.lifecycleScope import com.google.android.gms.ads.AdRequest import com.google.android.gms.ads.MobileAds import com.project.how.R -import com.project.how.adapter.recyclerview.RoundTripAirplaneListAdapter -import com.project.how.data_class.dto.GenerateSkyscannerUrlRequest -import com.project.how.data_class.dto.GetFlightOffersRequest -import com.project.how.data_class.dto.GetFlightOffersResponseElement -import com.project.how.data_class.dto.LikeFlightElement -import com.project.how.data_class.dto.LikeOneWayFlightElement -import com.project.how.data_class.dto.RoundTripFlightOffers +import com.project.how.adapter.recyclerview.booking.airplane.RoundTripAirplaneListAdapter +import com.project.how.data_class.dto.booking.airplane.GenerateSkyscannerUrlRequest +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersResponseElement +import com.project.how.data_class.dto.booking.airplane.LikeFlightElement +import com.project.how.data_class.dto.booking.airplane.RoundTripFlightOffers import com.project.how.data_class.roomdb.RecentAirplane import com.project.how.databinding.ActivityRoundTripAirplaneListBinding import com.project.how.view.activity.calendar.CalendarEditActivity diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/AiScheduleDialog.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/AiScheduleDialog.kt index e51606ec..6831f487 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/AiScheduleDialog.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/AiScheduleDialog.kt @@ -17,7 +17,7 @@ import com.bumptech.glide.Glide import com.google.android.material.tabs.TabLayout import com.project.how.BuildConfig import com.project.how.R -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter import com.project.how.data_class.recyclerview.AiSchedule import com.project.how.databinding.DialogAiScheduleBinding import com.project.how.interface_af.OnAddListener @@ -33,7 +33,6 @@ class AiScheduleDialog(private val data : AiSchedule, private val onAddListener: private lateinit var adapter : AiDaysScheduleAdapter override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - adapter = AiDaysScheduleAdapter(data.dailySchedule[0]) } override fun onCreateView( @@ -44,6 +43,7 @@ class AiScheduleDialog(private val data : AiSchedule, private val onAddListener: _binding = DataBindingUtil.inflate(inflater, R.layout.dialog_ai_schedule, container, false) binding.ai = this binding.lifecycleOwner = viewLifecycleOwner + adapter = AiDaysScheduleAdapter(requireContext(), data.dailySchedule[0]) dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) dialog?.window?.requestFeature(Window.FEATURE_NO_TITLE) val params = dialog?.window?.attributes diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/bottom_sheet_dialog/EditScheduleBottomSheetDialog.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/bottom_sheet_dialog/EditScheduleBottomSheetDialog.kt index 378a7a51..05e0aa28 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/bottom_sheet_dialog/EditScheduleBottomSheetDialog.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/dialog/bottom_sheet_dialog/EditScheduleBottomSheetDialog.kt @@ -23,7 +23,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialogFragment import com.project.how.BuildConfig import com.project.how.R -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter import com.project.how.data_class.recyclerview.DaysSchedule import com.project.how.databinding.EditScheduleBottomSheetBinding import com.project.how.interface_af.OnScheduleListener diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/CalendarFragment.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/CalendarFragment.kt index 93b54328..39eafb5f 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/CalendarFragment.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/CalendarFragment.kt @@ -19,13 +19,13 @@ import com.google.android.material.tabs.TabLayoutMediator import com.project.how.BuildConfig import com.project.how.R import com.project.how.adapter.recyclerview.viewpager.EventViewPagerAdapter -import com.project.how.adapter.recyclerview.RecentAddedCalendarsAdapter +import com.project.how.adapter.recyclerview.schedule.RecentAddedCalendarsAdapter import com.project.how.data_class.recyclerview.EventViewPager import com.project.how.data_class.recyclerview.Schedule -import com.project.how.data_class.dto.GetCountryLocationResponse -import com.project.how.data_class.dto.GetFastestSchedulesResponse -import com.project.how.data_class.dto.GetLatestSchedulesResponse -import com.project.how.data_class.dto.GetLatestSchedulesResponseElement +import com.project.how.data_class.dto.country.GetCountryLocationResponse +import com.project.how.data_class.dto.schedule.GetFastestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponseElement import com.project.how.databinding.FragmentCalendarBinding import com.project.how.interface_af.OnDesListener import com.project.how.view.activity.ai.AddAICalendarActivity diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/TicketFragment.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/TicketFragment.kt index 9c8c53db..48c5dca1 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/TicketFragment.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/main/TicketFragment.kt @@ -10,8 +10,8 @@ import androidx.databinding.DataBindingUtil import androidx.fragment.app.viewModels import com.google.android.material.tabs.TabLayoutMediator import com.project.how.R -import com.project.how.adapter.recyclerview.RecentAirplaneAdapter -import com.project.how.adapter.recyclerview.RecentHotelAdapter +import com.project.how.adapter.recyclerview.booking.airplane.RecentAirplaneAdapter +import com.project.how.adapter.recyclerview.booking.hotel.RecentHotelAdapter import com.project.how.adapter.recyclerview.viewpager.EventTicketViewPagerAdapter import com.project.how.data_class.recyclerview.EventViewPager import com.project.how.data_class.recyclerview.RecentHotel diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/OneWayLikeFragment.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/OneWayLikeFragment.kt index afd37963..a6bc4b01 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/OneWayLikeFragment.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/OneWayLikeFragment.kt @@ -10,9 +10,9 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.lifecycle.lifecycleScope import com.project.how.R -import com.project.how.adapter.recyclerview.OneWayAirplaneListAdapter -import com.project.how.data_class.dto.GetOneWayFlightOffersResponseElement -import com.project.how.data_class.dto.LikeOneWayFlightElement +import com.project.how.adapter.recyclerview.booking.airplane.OneWayAirplaneListAdapter +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersResponseElement +import com.project.how.data_class.dto.booking.airplane.LikeOneWayFlightElement import com.project.how.databinding.FragmentOneWayLikeBinding import com.project.how.view_model.BookingViewModel import com.project.how.view_model.MemberViewModel @@ -44,7 +44,8 @@ class OneWayLikeFragment : Fragment(), OneWayAirplaneListAdapter.OnItemClickList likes.forEachIndexed { index, d -> if (d.homeDuration == null){ lid.add(d.id) - data.add(GetOneWayFlightOffersResponseElement( + data.add( + GetOneWayFlightOffersResponseElement( d.id.toString(), d.carrierCode, d.totalPrice, @@ -55,7 +56,8 @@ class OneWayLikeFragment : Fragment(), OneWayAirplaneListAdapter.OnItemClickList d.abroadDuration, d.abroadDepartureTime, d.abroadArrivalTime - )) + ) + ) } } adapter = OneWayAirplaneListAdapter(requireContext(), data, lid,this) diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/RoundTripLikeFragment.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/RoundTripLikeFragment.kt index 122f3734..09cbea4f 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/RoundTripLikeFragment.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/mypage/RoundTripLikeFragment.kt @@ -10,12 +10,9 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import androidx.lifecycle.lifecycleScope import com.project.how.R -import com.project.how.adapter.recyclerview.OneWayAirplaneListAdapter -import com.project.how.adapter.recyclerview.RoundTripAirplaneListAdapter -import com.project.how.data_class.dto.GenerateSkyscannerUrlRequest -import com.project.how.data_class.dto.GetFlightOffersResponseElement -import com.project.how.data_class.dto.GetOneWayFlightOffersResponseElement -import com.project.how.data_class.dto.LikeFlightElement +import com.project.how.adapter.recyclerview.booking.airplane.RoundTripAirplaneListAdapter +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersResponseElement +import com.project.how.data_class.dto.booking.airplane.LikeFlightElement import com.project.how.databinding.FragmentRoundTripLikeBinding import com.project.how.view_model.BookingViewModel import com.project.how.view_model.MemberViewModel diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/OneWaySearchFragment.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/OneWaySearchFragment.kt index 30bacc5c..7ecfa72c 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/OneWaySearchFragment.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/OneWaySearchFragment.kt @@ -14,17 +14,13 @@ import androidx.lifecycle.lifecycleScope import com.google.android.material.datepicker.CalendarConstraints import com.google.android.material.datepicker.MaterialDatePicker import com.project.how.R -import com.project.how.data_class.dto.GetFlightOffersRequest -import com.project.how.data_class.dto.GetOneWayFlightOffersRequest -import com.project.how.data_class.dto.GetOneWayFlightOffersResponse -import com.project.how.data_class.dto.OneWayFlightOffers -import com.project.how.data_class.dto.RoundTripFlightOffers +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.OneWayFlightOffers import com.project.how.databinding.FragmentOneWaySearchBinding -import com.project.how.interface_af.OnDesListener import com.project.how.interface_af.OnLoadListener import com.project.how.interface_af.interface_ff.OnAirportListener import com.project.how.view.activity.ticket.OneWayAirplaneListActivity -import com.project.how.view.activity.ticket.RoundTripAirplaneListActivity import com.project.how.view.dialog.ConfirmDialog import com.project.how.view.dialog.bottom_sheet_dialog.AirportBottomSheetDialog import com.project.how.view_model.BookingViewModel diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/RoundTripSearchFragment.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/RoundTripSearchFragment.kt index 99799d10..bf954955 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/RoundTripSearchFragment.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/fragment/ticket/RoundTripSearchFragment.kt @@ -14,10 +14,9 @@ import androidx.lifecycle.lifecycleScope import com.google.android.material.datepicker.CalendarConstraints import com.google.android.material.datepicker.MaterialDatePicker import com.project.how.R -import com.project.how.data_class.dto.GetFlightOffersRequest -import com.project.how.data_class.dto.GetFlightOffersResponse -import com.project.how.data_class.dto.GetOneWayFlightOffersRequest -import com.project.how.data_class.dto.RoundTripFlightOffers +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.RoundTripFlightOffers import com.project.how.databinding.FragmentRoundTripSearchBinding import com.project.how.interface_af.OnLoadListener import com.project.how.interface_af.interface_ff.OnAirportListener diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view/map_helper/MarkerProducer.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view/map_helper/MarkerProducer.kt index c27393c4..bacf5c00 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view/map_helper/MarkerProducer.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view/map_helper/MarkerProducer.kt @@ -11,7 +11,7 @@ import com.google.android.gms.maps.model.BitmapDescriptorFactory import com.google.android.gms.maps.model.LatLng import com.google.android.gms.maps.model.MarkerOptions import com.project.how.R -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter import com.project.how.databinding.MapMarkerScheduleBinding class MarkerProducer { diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/AiScheduleViewModel.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/AiScheduleViewModel.kt index eb95201c..d2969764 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/AiScheduleViewModel.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/AiScheduleViewModel.kt @@ -4,14 +4,13 @@ import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter import com.project.how.data_class.recyclerview.AiDaysSchedule import com.project.how.data_class.recyclerview.AiSchedule import com.project.how.data_class.AiScheduleListInput -import com.project.how.data_class.dto.CreateScheduleListRequest -import com.project.how.data_class.dto.CreateScheduleListResponse -import com.project.how.data_class.dto.CreateScheduleRequest -import com.project.how.data_class.dto.CreateScheduleResponse +import com.project.how.data_class.dto.schedule.CreateScheduleListRequest +import com.project.how.data_class.dto.schedule.CreateScheduleListResponse +import com.project.how.data_class.dto.schedule.CreateScheduleResponse import com.project.how.model.AiScheduleRepository import com.project.how.network.client.ScheduleRetrofit import kotlinx.coroutines.channels.awaitClose @@ -98,6 +97,7 @@ class AiScheduleViewModel : ViewModel() { oneDaySchedule.add(AiDaysSchedule( AiDaysScheduleAdapter.PLACE, createScheduleResponse.schedules[i].scheduleDetail[j].detail, + 0L, //임시 createScheduleResponse.schedules[i].scheduleDetail[j].detail, createScheduleResponse.schedules[i].scheduleDetail[j].coordinate.latitude, createScheduleResponse.schedules[i].scheduleDetail[j].coordinate.longitude)) @@ -109,6 +109,7 @@ class AiScheduleViewModel : ViewModel() { return AiSchedule( title, country, + 0L, //임시 place, countryImage, startDate, @@ -118,12 +119,12 @@ class AiScheduleViewModel : ViewModel() { } private fun getTestAiSchedule() : AiSchedule { - val testAiDaysSchedule = mutableListOf(AiDaysSchedule(AiDaysScheduleAdapter.PLACE, "test Todo", "test", 0.0, 0.0)) - testAiDaysSchedule.add(AiDaysSchedule(AiDaysScheduleAdapter.AIRPLANE, "test airplane", "airplane", 0.0, 0.0)) - testAiDaysSchedule.add(AiDaysSchedule(AiDaysScheduleAdapter.HOTEL, "test hotel", "hotel", 0.0, 0.0)) - val testAiDaysSchedule2 = mutableListOf(AiDaysSchedule(AiDaysScheduleAdapter.AIRPLANE, "test airplane", "airplane", 0.0, 0.0)) - testAiDaysSchedule2.add(AiDaysSchedule(AiDaysScheduleAdapter.PLACE, "test Todo", "test", 0.0, 0.0)) - testAiDaysSchedule2.add(AiDaysSchedule(AiDaysScheduleAdapter.HOTEL, "test hotel", "hotel", 0.0, 0.0)) + val testAiDaysSchedule = mutableListOf(AiDaysSchedule(AiDaysScheduleAdapter.PLACE, "test Todo", 0L, "test", 0.0, 0.0)) + testAiDaysSchedule.add(AiDaysSchedule(AiDaysScheduleAdapter.AIRPLANE, "test airplane",0L, "airplane", 0.0, 0.0)) + testAiDaysSchedule.add(AiDaysSchedule(AiDaysScheduleAdapter.HOTEL, "test hotel", 0L, "hotel", 0.0, 0.0)) + val testAiDaysSchedule2 = mutableListOf(AiDaysSchedule(AiDaysScheduleAdapter.AIRPLANE, "test airplane", 0L,"airplane", 0.0, 0.0)) + testAiDaysSchedule2.add(AiDaysSchedule(AiDaysScheduleAdapter.PLACE, "test Todo", 0L, "test", 0.0, 0.0)) + testAiDaysSchedule2.add(AiDaysSchedule(AiDaysScheduleAdapter.HOTEL, "test hotel", 0L,"hotel", 0.0, 0.0)) val dailySchedule = mutableListOf>() for (i in 0..2){ if (i % 2== 0){ @@ -135,6 +136,7 @@ class AiScheduleViewModel : ViewModel() { return AiSchedule( "TestTitle", "프랑스", + 0L, listOf("test1", "test2", "test3", "test4", "test5", "tttteeeessssssss6"), "https://img.freepik.com/free-photo/vertical-shot-beautiful-eiffel-tower-captured-paris-france_181624-45445.jpg?w=740&t=st=1708260600~exp=1708261200~hmac=01d8abec61f555d0edb040d41ce8ea39904853aea6df7c37ce0b5a35e07c1954", "2024-02-18", diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/BookingViewModel.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/BookingViewModel.kt index 9d097fff..72976e7d 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/BookingViewModel.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/BookingViewModel.kt @@ -7,16 +7,16 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.project.how.R import com.project.how.data_class.dto.EmptyResponse -import com.project.how.data_class.dto.GenerateOneWaySkyscannerUrlRequest -import com.project.how.data_class.dto.GenerateSkyscannerUrlRequest -import com.project.how.data_class.dto.GenerateSkyscannerUrlResponse -import com.project.how.data_class.dto.GetFlightOffersRequest -import com.project.how.data_class.dto.GetFlightOffersResponse -import com.project.how.data_class.dto.GetLikeFlightResponse -import com.project.how.data_class.dto.GetOneWayFlightOffersRequest -import com.project.how.data_class.dto.GetOneWayFlightOffersResponse -import com.project.how.data_class.dto.LikeFlightElement -import com.project.how.data_class.dto.LikeOneWayFlightElement +import com.project.how.data_class.dto.booking.airplane.GenerateOneWaySkyscannerUrlRequest +import com.project.how.data_class.dto.booking.airplane.GenerateSkyscannerUrlRequest +import com.project.how.data_class.dto.booking.airplane.GenerateSkyscannerUrlResponse +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.GetLikeFlightResponse +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersRequest +import com.project.how.data_class.dto.booking.airplane.GetOneWayFlightOffersResponse +import com.project.how.data_class.dto.booking.airplane.LikeFlightElement +import com.project.how.data_class.dto.booking.airplane.LikeOneWayFlightElement import com.project.how.data_class.roomdb.RecentAirplane import com.project.how.model.BookingRepository import com.project.how.network.client.BookingRetrofit @@ -29,7 +29,6 @@ import kotlinx.coroutines.launch import retrofit2.Call import retrofit2.Callback import retrofit2.Response -import java.util.LinkedList import javax.inject.Inject @HiltViewModel diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/MemberViewModel.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/MemberViewModel.kt index 1c305a86..7d3d62e3 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/MemberViewModel.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/MemberViewModel.kt @@ -8,12 +8,12 @@ import androidx.lifecycle.viewModelScope import com.google.firebase.auth.FirebaseUser import com.project.how.R import com.project.how.data_class.MemberInfo -import com.project.how.data_class.dto.LoginRequest +import com.project.how.data_class.dto.member.LoginRequest import com.project.how.data_class.Tokens -import com.project.how.data_class.dto.AuthRecreateRequest +import com.project.how.data_class.dto.member.AuthRecreateRequest import com.project.how.data_class.dto.EmptyResponse -import com.project.how.data_class.dto.GetInfoResponse -import com.project.how.data_class.dto.SignUpRequest +import com.project.how.data_class.dto.member.GetInfoResponse +import com.project.how.data_class.dto.member.SignUpRequest import com.project.how.model.MemberRepository import com.project.how.network.client.MemberRetrofit import kotlinx.coroutines.channels.awaitClose diff --git a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/ScheduleViewModel.kt b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/ScheduleViewModel.kt index 4139cbcb..13dd2d37 100644 --- a/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/ScheduleViewModel.kt +++ b/android/HowAboutTrip/app/src/main/java/com/project/how/view_model/ScheduleViewModel.kt @@ -6,17 +6,17 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.project.how.R -import com.project.how.adapter.recyclerview.AiDaysScheduleAdapter +import com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter import com.project.how.data_class.recyclerview.AiSchedule import com.project.how.data_class.recyclerview.DaysSchedule import com.project.how.data_class.recyclerview.Schedule -import com.project.how.data_class.dto.DailySchedule -import com.project.how.data_class.dto.GetCountryLocationRequest -import com.project.how.data_class.dto.GetCountryLocationResponse -import com.project.how.data_class.dto.GetFastestSchedulesResponse -import com.project.how.data_class.dto.GetLatestSchedulesResponse -import com.project.how.data_class.dto.GetScheduleListResponse -import com.project.how.data_class.dto.ScheduleDetail +import com.project.how.data_class.dto.schedule.DailySchedule +import com.project.how.data_class.dto.country.GetCountryLocationRequest +import com.project.how.data_class.dto.country.GetCountryLocationResponse +import com.project.how.data_class.dto.schedule.GetFastestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetLatestSchedulesResponse +import com.project.how.data_class.dto.schedule.GetScheduleListResponse +import com.project.how.data_class.dto.schedule.ScheduleDetail import com.project.how.model.ScheduleRepository import com.project.how.network.client.ScheduleRetrofit import kotlinx.coroutines.channels.awaitClose @@ -141,19 +141,20 @@ class ScheduleViewModel : ViewModel() { return context.getString(R.string.place_string) } - private fun changeClassFromScheduleToSaveSchedule(context : Context, schedule: Schedule) : ScheduleDetail{ + private fun changeClassFromScheduleToSaveSchedule(context : Context, schedule: Schedule) : ScheduleDetail { val startDate = LocalDate.parse(schedule.startDate, DateTimeFormatter.ISO_DATE) var dailySchedules = listOf() schedule.dailySchedule.forEachIndexed { index, data -> - var schedules = listOf() + var schedules = listOf() data.forEach {daysSchedule-> - val schedule = com.project.how.data_class.dto.Schedule( + val schedule = com.project.how.data_class.dto.schedule.Schedule( daysSchedule.todo, daysSchedule.places, getScheduleType(context, daysSchedule.type), daysSchedule.cost, daysSchedule.latitude ?: 0.0, - daysSchedule.longitude ?: 0.0) + daysSchedule.longitude ?: 0.0 + ) schedules = schedules.plus(schedule) } val date = startDate.plusDays(index.toLong()) diff --git a/android/HowAboutTrip/app/src/main/res/color/main_menu.xml b/android/HowAboutTrip/app/src/main/res/color/main_menu.xml index 9bd23fff..387ca513 100644 --- a/android/HowAboutTrip/app/src/main/res/color/main_menu.xml +++ b/android/HowAboutTrip/app/src/main/res/color/main_menu.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/res/drawable/gray_dialog_no.xml b/android/HowAboutTrip/app/src/main/res/drawable/gray_dialog_no.xml index 30089b81..00c8235b 100644 --- a/android/HowAboutTrip/app/src/main/res/drawable/gray_dialog_no.xml +++ b/android/HowAboutTrip/app/src/main/res/drawable/gray_dialog_no.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/res/drawable/gray_round_rectangle.xml b/android/HowAboutTrip/app/src/main/res/drawable/gray_round_rectangle.xml index 95c9f5ea..6b9056d2 100644 --- a/android/HowAboutTrip/app/src/main/res/drawable/gray_round_rectangle.xml +++ b/android/HowAboutTrip/app/src/main/res/drawable/gray_round_rectangle.xml @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/res/drawable/icon_bill.xml b/android/HowAboutTrip/app/src/main/res/drawable/icon_bill.xml new file mode 100644 index 00000000..64171d8a --- /dev/null +++ b/android/HowAboutTrip/app/src/main/res/drawable/icon_bill.xml @@ -0,0 +1,34 @@ + + + + + + diff --git a/android/HowAboutTrip/app/src/main/res/drawable/icon_question.xml b/android/HowAboutTrip/app/src/main/res/drawable/icon_question.xml new file mode 100644 index 00000000..9a0648ea --- /dev/null +++ b/android/HowAboutTrip/app/src/main/res/drawable/icon_question.xml @@ -0,0 +1,9 @@ + + + diff --git a/android/HowAboutTrip/app/src/main/res/layout/activity_calendar.xml b/android/HowAboutTrip/app/src/main/res/layout/activity_calendar.xml index 4f9ccb2b..3df8f285 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/activity_calendar.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/activity_calendar.xml @@ -185,7 +185,7 @@ android:layout_marginTop="29dp" app:cardCornerRadius="14dp" app:cardElevation="0dp" - android:backgroundTint="@color/gray" + android:backgroundTint="@color/grey" app:layout_constraintEnd_toStartOf="@+id/guideline2" app:layout_constraintStart_toStartOf="@+id/guideline1" app:layout_constraintTop_toBottomOf="@+id/constraintLayout2"> diff --git a/android/HowAboutTrip/app/src/main/res/layout/activity_calendar_edit.xml b/android/HowAboutTrip/app/src/main/res/layout/activity_calendar_edit.xml index adad68c2..1339befc 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/activity_calendar_edit.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/activity_calendar_edit.xml @@ -173,7 +173,7 @@ android:layout_marginTop="29dp" app:cardCornerRadius="14dp" app:cardElevation="0dp" - android:backgroundTint="@color/gray" + android:backgroundTint="@color/grey" app:layout_constraintEnd_toStartOf="@+id/guideline2" app:layout_constraintStart_toStartOf="@+id/guideline1" app:layout_constraintTop_toBottomOf="@+id/constraintLayout2"> diff --git a/android/HowAboutTrip/app/src/main/res/layout/activity_main.xml b/android/HowAboutTrip/app/src/main/res/layout/activity_main.xml index 20fb1045..3af68c90 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/activity_main.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/activity_main.xml @@ -74,7 +74,7 @@ android:layout_marginEnd="10dp" style="@style/WhiteBottomNavigationView" app:labelVisibilityMode="labeled" - app:itemIconSize="28dp" + app:itemIconSize="22dp" app:itemIconTint="@color/main_menu" app:itemTextColor="@color/main_menu" app:itemRippleColor="@android:color/transparent" diff --git a/android/HowAboutTrip/app/src/main/res/layout/activity_one_way_airplane_list.xml b/android/HowAboutTrip/app/src/main/res/layout/activity_one_way_airplane_list.xml index 8002da12..e3ef9046 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/activity_one_way_airplane_list.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/activity_one_way_airplane_list.xml @@ -56,7 +56,7 @@ android:layout_height="0dp" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" android:orientation="vertical" - tools:listitem="@layout/round_trip_airplane_list_item" + tools:listitem="@layout/one_way_airplane_list_item" app:layout_constraintBottom_toTopOf="@+id/adView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -72,13 +72,6 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> - - - \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/res/layout/activity_weather.xml b/android/HowAboutTrip/app/src/main/res/layout/activity_weather.xml index b145b771..31433d2d 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/activity_weather.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/activity_weather.xml @@ -62,12 +62,39 @@ - + + + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + + \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/res/layout/ai_days_schedule_item.xml b/android/HowAboutTrip/app/src/main/res/layout/ai_days_schedule_item.xml index 59358439..c7486dfd 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/ai_days_schedule_item.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/ai_days_schedule_item.xml @@ -6,7 +6,7 @@ + type="com.project.how.adapter.recyclerview.schedule.AiDaysScheduleAdapter" /> + type="com.project.how.adapter.recyclerview.schedule.AiScheduleAdapter" /> + type="com.project.how.adapter.recyclerview.schedule.DaysScheduleEditAdapter" /> + type="com.project.how.adapter.recyclerview.schedule.DaysScheduleAdapter" /> + type="com.project.how.adapter.recyclerview.schedule.CalendarListAdapter" /> + android:paddingTop="20dp"> + + + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintEnd_toStartOf="@id/like"/> @@ -70,9 +79,9 @@ android:layout_height="35dp" android:background="@android:color/transparent" android:scaleType="fitCenter" - android:src="@drawable/icon_exchange_rate" + android:src="@drawable/icon_picture_linear" android:layout_marginTop="40dp" - app:layout_constraintStart_toEndOf="@id/weather" + app:layout_constraintStart_toEndOf="@id/like" app:layout_constraintTop_toBottomOf="@+id/name_edit" app:layout_constraintEnd_toStartOf="@id/picture"/> @@ -83,7 +92,7 @@ android:layout_marginTop="40dp" android:background="@android:color/transparent" android:scaleType="fitCenter" - android:src="@drawable/icon_picture_linear" + android:src="@drawable/icon_bill" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/exchange_rate" app:layout_constraintTop_toBottomOf="@+id/name_edit" /> @@ -105,21 +114,21 @@ android:id="@+id/textView3" android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/weather" + android:text="@string/heart" android:textSize="13sp" android:gravity="center" android:layout_marginTop="5dp" android:textColor="@color/black" - android:onClick="@{()-> mypage.moveWeather()}" + android:onClick="@{()->mypage.moveLike()}" app:layout_constraintStart_toEndOf="@+id/textView2" - app:layout_constraintTop_toBottomOf="@+id/weather" + app:layout_constraintTop_toBottomOf="@+id/like" app:layout_constraintEnd_toStartOf="@id/textView4"/> @@ -175,10 +184,10 @@ android:layout_marginStart="1dp" android:background="@android:color/transparent" android:scaleType="fitCenter" - android:src="@drawable/icon_talk" + android:src="@drawable/icon_setting" android:layout_marginTop="30dp" app:layout_constraintEnd_toStartOf="@id/setting" - app:layout_constraintStart_toEndOf="@+id/heart" + app:layout_constraintStart_toEndOf="@+id/weather" app:layout_constraintTop_toBottomOf="@+id/textView4" /> @@ -210,21 +219,20 @@ android:id="@+id/textView7" android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/heart" + android:text="@string/exchange_rate" android:textSize="13sp" android:gravity="center" android:layout_marginTop="5dp" android:textColor="@color/black" - android:onClick="@{()->mypage.moveLike()}" app:layout_constraintStart_toEndOf="@+id/textView6" - app:layout_constraintTop_toBottomOf="@+id/heart" + app:layout_constraintTop_toBottomOf="@+id/weather" app:layout_constraintEnd_toStartOf="@id/textView8"/> + app:layout_constraintGuide_percent="0.25"/> + type="com.project.how.adapter.recyclerview.booking.airplane.OneWayAirplaneListAdapter" /> diff --git a/android/HowAboutTrip/app/src/main/res/layout/recent_added_calendars_item.xml b/android/HowAboutTrip/app/src/main/res/layout/recent_added_calendars_item.xml index fa1069c7..aeab7faa 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/recent_added_calendars_item.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/recent_added_calendars_item.xml @@ -5,7 +5,7 @@ + type="com.project.how.adapter.recyclerview.schedule.RecentAddedCalendarsAdapter" /> + type="com.project.how.adapter.recyclerview.booking.airplane.RecentAirplaneAdapter" /> + type="com.project.how.adapter.recyclerview.booking.airplane.RecentAirplaneAdapter" /> + type="com.project.how.adapter.recyclerview.booking.airplane.RoundTripAirplaneListAdapter" /> @@ -95,7 +95,7 @@ android:layout_height="30dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" - android:src="@color/gray" + android:src="@color/grey" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/abroad_airport" /> diff --git a/android/HowAboutTrip/app/src/main/res/layout/viewpager_recent_record_item.xml b/android/HowAboutTrip/app/src/main/res/layout/viewpager_recent_record_item.xml index 2906d64e..e517a21a 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/viewpager_recent_record_item.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/viewpager_recent_record_item.xml @@ -5,7 +5,7 @@ + type="com.project.how.adapter.recyclerview.schedule.RecentAddedCalendarsAdapter" /> @@ -58,7 +58,7 @@ android:id="@+id/first_image" android:layout_width="100dp" android:layout_height="100dp" - android:src="@color/gray" + android:src="@color/grey" app:civ_border_color="@color/white" app:civ_border_width="3dp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/android/HowAboutTrip/app/src/main/res/layout/viewpager_round_event.xml b/android/HowAboutTrip/app/src/main/res/layout/viewpager_round_event.xml index c329d824..44849ae4 100644 --- a/android/HowAboutTrip/app/src/main/res/layout/viewpager_round_event.xml +++ b/android/HowAboutTrip/app/src/main/res/layout/viewpager_round_event.xml @@ -17,7 +17,7 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/res/values/colors.xml b/android/HowAboutTrip/app/src/main/res/values/colors.xml index 8fff51d8..dfb2286c 100644 --- a/android/HowAboutTrip/app/src/main/res/values/colors.xml +++ b/android/HowAboutTrip/app/src/main/res/values/colors.xml @@ -2,7 +2,7 @@ #FF000000 #FFFFFFFF - #FFD9D9D9 + #FFD9D9D9 #FFEDEDED #FFCF2727 #FF827979 @@ -11,4 +11,5 @@ #FF606060 #88000000 #44000000 + #FF6ABFC5 \ No newline at end of file diff --git a/android/HowAboutTrip/app/src/main/res/values/strings.xml b/android/HowAboutTrip/app/src/main/res/values/strings.xml index 58977ccf..218bf10d 100644 --- a/android/HowAboutTrip/app/src/main/res/values/strings.xml +++ b/android/HowAboutTrip/app/src/main/res/values/strings.xml @@ -309,4 +309,7 @@ 해당 계정에 저장된 관심상품이 아닙니다. %1$s → %2$s %1$s ↔ %2$s + 여행 기록 + 여행 지출 + 총 예산 비용 : %1$s 원 \ No newline at end of file