Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore/#195] change new color scheme #196

Merged
merged 6 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {

defaultConfig {
applicationId "com.eatssu.android"
minSdk 23
minSdk 28
targetSdk 34
versionCode 17
versionName "1.1.15"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/eatssu/android/data/model/Section.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ data class Section(
val menuType: MenuType,
val cafeteria: Restaurant,
val menuList: List<Menu>?,
val cafeteriaLocation: String
// val sortOrder: Int
)
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package com.eatssu.android.ui.main.calendar

import android.os.Build
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.annotation.RequiresApi
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.eatssu.android.R
import com.eatssu.android.databinding.ItemCalendarListBinding
import com.eatssu.android.util.CalendarUtils
import java.time.LocalDate
import java.time.format.TextStyle
import java.util.*
import java.util.Locale


internal class CalendarAdapter(
Expand All @@ -34,17 +32,16 @@ internal class CalendarAdapter(
}


@RequiresApi(Build.VERSION_CODES.O)
override fun onBindViewHolder(holder: CalendarViewHolder, position: Int) {
val date = days[position]
holder.dayOfMonth.text = date.dayOfMonth.toString()
holder.dayText.text =
date.dayOfWeek.getDisplayName(TextStyle.SHORT, Locale.KOREAN).toString()

if (date == CalendarUtils.selectedDate) {
holder.parentView.setBackgroundResource(R.drawable.selector_background_blue)
//날짜
holder.dayOfMonth.setBackgroundResource(R.drawable.selector_background_blue)
holder.dayOfMonth.setTextColor(ContextCompat.getColor(holder.itemView.context, R.color.selector_calendar_colortext))
holder.dayText.setTextColor(ContextCompat.getColor(holder.itemView.context, R.color.selector_calendar_colortext))
}
else {
holder.parentView.setBackgroundResource(R.drawable.ic_selector_background_white)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.eatssu.android.data.model.Section
import com.eatssu.android.databinding.ItemSectionBinding
import com.eatssu.android.databinding.ItemCafeteriaSectionBinding
import com.eatssu.android.ui.info.InfoActivity

class MenuAdapter(
Expand All @@ -16,7 +16,7 @@ class MenuAdapter(
) : RecyclerView.Adapter<MenuAdapter.MyViewHolder>() {

class MyViewHolder(
private val binding: ItemSectionBinding
private val binding: ItemCafeteriaSectionBinding
) : RecyclerView.ViewHolder(binding.root) {

fun bind(sectionModel: Section) {
Expand All @@ -28,6 +28,8 @@ class MenuAdapter(
}

binding.tvCafeteria.text = sectionModel.cafeteria.displayName
binding.tvCafeteriaLocation.text = sectionModel.cafeteriaLocation

binding.rvMenu.apply {
setHasFixedSize(true)
layoutManager = LinearLayoutManager(binding.root.context)
Expand All @@ -39,7 +41,8 @@ class MenuAdapter(
}

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder {
return MyViewHolder(ItemSectionBinding.inflate(
return MyViewHolder(
ItemCafeteriaSectionBinding.inflate(
LayoutInflater.from(parent.context),
parent, false))
}
Expand Down
30 changes: 25 additions & 5 deletions app/src/main/java/com/eatssu/android/ui/main/menu/MenuFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ import com.eatssu.android.data.enums.MenuType
import com.eatssu.android.data.enums.Restaurant
import com.eatssu.android.data.enums.Time
import com.eatssu.android.data.model.Section
import com.eatssu.android.data.repository.FirebaseRemoteConfigRepository
import com.eatssu.android.data.service.MealService
import com.eatssu.android.data.service.MenuService
import com.eatssu.android.databinding.FragmentMenuBinding
import com.eatssu.android.ui.info.InfoViewModel
import com.eatssu.android.ui.info.InfoViewModelFactory
import com.eatssu.android.ui.main.calendar.CalendarViewModel
import com.eatssu.android.util.RetrofitImpl
import java.time.DayOfWeek
Expand All @@ -38,6 +41,7 @@ class MenuFragment : Fragment() {
private lateinit var mealService: MealService

private lateinit var menuDate: String
private lateinit var cafeteriaLocation: String

val foodCourtDataLoaded = MutableLiveData<Boolean>()
val snackCornerDataLoaded = MutableLiveData<Boolean>()
Expand All @@ -47,6 +51,10 @@ class MenuFragment : Fragment() {

private val totalMenuList = ArrayList<Section>()

private lateinit var infoViewModel: InfoViewModel
private lateinit var restaurantType: Restaurant
private lateinit var firebaseRemoteConfigRepository: FirebaseRemoteConfigRepository


companion object {
fun newInstance(time: Time): MenuFragment {
Expand All @@ -67,6 +75,13 @@ class MenuFragment : Fragment() {
savedInstanceState: Bundle?,
): View {
_binding = FragmentMenuBinding.inflate(inflater, container, false)

firebaseRemoteConfigRepository = FirebaseRemoteConfigRepository()
infoViewModel = ViewModelProvider(
this,
InfoViewModelFactory(firebaseRemoteConfigRepository)
)[InfoViewModel::class.java]

return binding.root
}

Expand Down Expand Up @@ -129,7 +144,8 @@ class MenuFragment : Fragment() {
Section(
MenuType.FIXED,
Restaurant.FOOD_COURT,
result.mapFixedMenuResponseToMenu()
result.mapFixedMenuResponseToMenu(),
infoViewModel.foodLocation.value.toString()
)
)
}
Expand All @@ -146,7 +162,8 @@ class MenuFragment : Fragment() {
Section(
MenuType.FIXED,
Restaurant.SNACK_CORNER,
result.mapFixedMenuResponseToMenu()
result.mapFixedMenuResponseToMenu(),
infoViewModel.snackLocation.value.toString()
)
)
}
Expand Down Expand Up @@ -180,7 +197,8 @@ class MenuFragment : Fragment() {
Section(
MenuType.VARIABLE,
Restaurant.HAKSIK,
result.mapTodayMenuResponseToMenu()
result.mapTodayMenuResponseToMenu(),
infoViewModel.haksikLocation.value.toString()
)
)

Expand All @@ -198,7 +216,8 @@ class MenuFragment : Fragment() {
Section(
MenuType.VARIABLE,
Restaurant.DODAM,
result.mapTodayMenuResponseToMenu()
result.mapTodayMenuResponseToMenu(),
infoViewModel.dodamLocation.value.toString()
)
)
}
Expand All @@ -214,7 +233,8 @@ class MenuFragment : Fragment() {
Section(
MenuType.VARIABLE,
Restaurant.DORMITORY,
result.mapTodayMenuResponseToMenu()
result.mapTodayMenuResponseToMenu(),
infoViewModel.dormitoryLocation.value.toString()
)
)
}
Expand Down
Binary file removed app/src/main/res/drawable-v24/ic_arrow_left.png
Binary file not shown.
Binary file added app/src/main/res/drawable/ic_arrow_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable/ic_arrow_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/ic_info_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_location.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="30dp" android:tint="@color/Primary_Light"
<vector android:height="30dp" android:tint="@color/primary"
android:viewportHeight="24" android:viewportWidth="24"
android:width="30dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/>
Expand Down
Binary file added app/src/main/res/drawable/ic_menu_24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/layer_bottom_shadow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<!-- 하단에 그림자 표시 -->
<item>
<shape android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="@android:color/transparent"
android:startColor="#55000000" />
</shape>
</item>

</layer-list>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/layer_progress.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<scale android:scaleWidth="100%">
<shape>
<corners android:radius="4dp"/>
<solid android:color="@color/Primary_Light"/>
<solid android:color="@color/primary"/>
</shape>
</scale>
</item>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/selector_background_blue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="false" android:state_pressed="false">
<shape android:shape="oval">
<solid android:color="@color/Primary_Light"/>
<solid android:color="@color/primary"/>
<!-- 선 굵기 -->
<stroke android:width="1dp"
android:color="@color/Primary_Light" />
android:color="@color/primary" />
<!-- 여기 모서리 둥글게 -->
<corners android:radius="600dp" />
</shape>
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/selector_calendar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
<selector android:exitFadeDuration="@android:integer/config_shortAnimTime"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_checked="true"
android:drawable="@drawable/transparent_calendar_element" />
android:drawable="@drawable/shape_transparent_calendar_element" android:state_checked="true" />
<item
android:state_pressed="true"
android:drawable="@drawable/transparent_calendar_element" />
android:drawable="@drawable/shape_transparent_calendar_element" android:state_pressed="true" />
<item android:drawable="@android:color/transparent" />
</selector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/shape_btn.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/Primary_Light" />
<solid android:color="@color/primary" />
<corners
android:radius="10dp"/>
<padding android:right="10dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/shape_btn_mini.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/Primary_Light" />
<solid android:color="@color/primary" />
<corners
android:radius="20dp"/>
<padding
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/drawable/shape_cafeteria_corner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />

<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
</shape>
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/shape_cafeteria_section.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />

<stroke
android:width="1dp"
android:color="@color/gray200" />

<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/shape_edittext_small.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<solid android:color="@color/white" />
<stroke
android:width="1dp"
android:color="@color/Primary_Light"/>
android:color="@color/primary"/>
<corners
android:radius="10dp"/>
<padding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="@color/Primary_Light"/>
android:color="@color/primary"/>
</shape>
34 changes: 22 additions & 12 deletions app/src/main/res/font-v26/font.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,40 @@
xmlns:app="http://schemas.android.com/apk/res-auto">

<font
android:font="@font/noto_bold"
app:font="@font/noto_bold" />
android:font="@font/pretendard_black"
app:font="@font/pretendard_black" />

<font
android:font="@font/noto_semibold"
android:font="@font/pretendard_bold"
android:fontWeight="700"
app:font="@font/noto_semibold" />
app:font="@font/pretendard_bold" />

<font
android:font="@font/noto_light"
app:font="@font/noto_light" />
android:font="@font/pretendard_extrabold"
app:font="@font/pretendard_extrabold" />

<font
android:font="@font/noto_medium"
app:font="@font/noto_medium" />
android:font="@font/pretendard_extralight"
app:font="@font/pretendard_extralight" />

<font
android:font="@font/noto_regular"
app:font="@font/noto_regular" />
android:font="@font/pretendard_light"
app:font="@font/pretendard_light" />

<font
android:font="@font/noto_thin"
app:font="@font/noto_thin" />
android:font="@font/pretendard_medium"
app:font="@font/pretendard_medium" />

<font
android:font="@font/pretendard_regular"
app:font="@font/pretendard_regular" />

<font
android:font="@font/pretendard_semibold"
app:font="@font/pretendard_semibold" />

<font
android:font="@font/pretendard_thin"
app:font="@font/pretendard_thin" />
</font-family>

Binary file removed app/src/main/res/font/noto_bold.otf
Binary file not shown.
Binary file removed app/src/main/res/font/noto_light.otf
Binary file not shown.
Binary file removed app/src/main/res/font/noto_medium.otf
Binary file not shown.
Binary file removed app/src/main/res/font/noto_regular.otf
Binary file not shown.
Binary file removed app/src/main/res/font/noto_semibold.otf
Binary file not shown.
Binary file removed app/src/main/res/font/noto_thin.otf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_black.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_bold.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_extrabold.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_extralight.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_light.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_medium.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_regular.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_semibold.ttf
Binary file not shown.
Binary file added app/src/main/res/font/pretendard_thin.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@

<TextView
android:id="@+id/toolbar_title"
style="@style/AndroidH2"
style="@style/H2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text=""
android:textColor="@color/Primary_Light" />
android:textColor="@color/primary" />
</androidx.appcompat.widget.Toolbar>


Expand Down
Loading
Loading