Archived
Transitioned from a fairly custom solution to using a colour palette generated by the Material Theme Builder to simplify colour management. Also began work on a bottom sheet for displaying allergens and additives in canteen offers.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
<activity
|
||||
android:name=".activity.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.StudIPTimetable">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -8,16 +8,37 @@ import com.denizk0461.studip.databinding.ItemCanteenBinding
|
||||
import com.denizk0461.studip.databinding.ItemCanteenLineBinding
|
||||
import com.denizk0461.studip.databinding.ItemIconBinding
|
||||
import com.denizk0461.studip.model.CanteenOfferGroup
|
||||
import com.denizk0461.studip.model.CanteenOfferGroupElement
|
||||
|
||||
/**
|
||||
* Custom RecyclerView adapter that lays out the offers of a given canteen on a given day.
|
||||
*
|
||||
* @param offers list of all offers filtered by canteen and day, grouped by category
|
||||
* @param onClickListener used for listening to clicks and long presses
|
||||
*/
|
||||
class CanteenOfferItemAdapter(
|
||||
private val offers: List<CanteenOfferGroup>
|
||||
private val offers: List<CanteenOfferGroup>,
|
||||
private val onClickListener: OnClickListener
|
||||
) : RecyclerView.Adapter<CanteenOfferItemAdapter.OfferViewHolder>() {
|
||||
|
||||
/**
|
||||
* Provides a converting function between the index of a dietary preference and its according
|
||||
* icon.
|
||||
*/
|
||||
private val indexToDrawable: Map<Int, Int> = mapOf(
|
||||
0 to R.drawable.handshake,
|
||||
1 to R.drawable.fish,
|
||||
2 to R.drawable.chicken,
|
||||
3 to R.drawable.sheep,
|
||||
4 to R.drawable.yoga,
|
||||
5 to R.drawable.cow,
|
||||
6 to R.drawable.pig,
|
||||
7 to R.drawable.leaf,
|
||||
8 to R.drawable.carrot,
|
||||
9 to R.drawable.deer,
|
||||
10 to R.drawable.circle,
|
||||
)
|
||||
|
||||
/**
|
||||
* View holder class for parent class
|
||||
*
|
||||
@@ -86,26 +107,39 @@ class CanteenOfferItemAdapter(
|
||||
line.imageViewContainer.addView(img.root)
|
||||
}
|
||||
|
||||
// Set up single click listener
|
||||
line.root.setOnClickListener {
|
||||
onClickListener.onClick(offer)
|
||||
}
|
||||
|
||||
// Set up long press listener
|
||||
line.root.setOnLongClickListener {
|
||||
onClickListener.onLongClick(offer)
|
||||
}
|
||||
// Bind the new line to the line container
|
||||
holder.binding.lineContainer.addView(line.root)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a converting function between the index of a dietary preference and its according
|
||||
* icon.
|
||||
* Interface used to evaluate clicks and long presses on a given item.
|
||||
*/
|
||||
private val indexToDrawable: Map<Int, Int> = mapOf(
|
||||
0 to R.drawable.handshake,
|
||||
1 to R.drawable.fish,
|
||||
2 to R.drawable.chicken,
|
||||
3 to R.drawable.sheep,
|
||||
4 to R.drawable.yoga,
|
||||
5 to R.drawable.cow,
|
||||
6 to R.drawable.pig,
|
||||
7 to R.drawable.leaf,
|
||||
8 to R.drawable.carrot,
|
||||
9 to R.drawable.deer,
|
||||
10 to R.drawable.circle,
|
||||
)
|
||||
interface OnClickListener {
|
||||
|
||||
/**
|
||||
* Executed when an item has been clicked.
|
||||
*
|
||||
* @param offer item that has been clicked
|
||||
*/
|
||||
fun onClick(offer: CanteenOfferGroupElement)
|
||||
|
||||
|
||||
/**
|
||||
* Executed when an item has been long-pressed.
|
||||
*
|
||||
* @param offer item that has been long-pressed
|
||||
* @return whether the long press was successful
|
||||
*/
|
||||
fun onLongClick(offer: CanteenOfferGroupElement): Boolean
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,12 @@ import com.denizk0461.studip.model.CanteenOfferGroup
|
||||
* @param daysCovered tells for how many days offers are available for.
|
||||
* Example: if the next two weeks are available, Monday through Friday and
|
||||
* excluding weekends, this value should be 10.
|
||||
* @param onClickListener for managing click and long press events
|
||||
*/
|
||||
class CanteenOfferPageAdapter(
|
||||
private var offers: List<CanteenOfferGroup>,
|
||||
private var daysCovered: Int,
|
||||
private val onClickListener: CanteenOfferItemAdapter.OnClickListener,
|
||||
) : RecyclerView.Adapter<CanteenOfferPageAdapter.CanteenOfferPageViewHolder>() {
|
||||
|
||||
/**
|
||||
@@ -50,8 +52,12 @@ class CanteenOfferPageAdapter(
|
||||
/*
|
||||
* Create new adapter for every page. Attribute position denotes day that will be set up
|
||||
* by the newly created adapter (0 = Monday, 4 = Friday)
|
||||
* TODO check if the filtered list is empty, and tell the user if it is
|
||||
*/
|
||||
adapter = CanteenOfferItemAdapter(offers.filter { it.dateId == position }) // TODO check if empty
|
||||
adapter = CanteenOfferItemAdapter(
|
||||
offers.filter { it.dateId == position },
|
||||
onClickListener
|
||||
)
|
||||
|
||||
// Animate creation of new page
|
||||
scheduleLayoutAnimation()
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.denizk0461.studip.adapter
|
||||
|
||||
import android.content.res.ColorStateList
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.denizk0461.studip.R
|
||||
import com.denizk0461.studip.model.StudIPEvent
|
||||
import com.denizk0461.studip.databinding.ItemEventBinding
|
||||
import java.util.*
|
||||
@@ -72,42 +69,43 @@ class StudIPEventItemAdapter(
|
||||
// Use parsed timeslot string as defined in StudIPEvent#timeslot()
|
||||
holder.binding.textTimeslot.text = currentItem.timeslot()
|
||||
|
||||
// TODO highlighting functionality is currently not supported!
|
||||
// Set up colours used for highlighting and un-highlighting an item.
|
||||
val colorPrimaryTranslucent = TypedValue()
|
||||
val colorCardBackground = TypedValue()
|
||||
val colorTextHintLighter = TypedValue()
|
||||
// val colorPrimaryTranslucent = TypedValue()
|
||||
// val colorCardBackground = TypedValue()
|
||||
// val colorTextHintLighter = TypedValue()
|
||||
|
||||
// Resolve themed attributes to get the right values for day and night modes
|
||||
holder.binding.root.context.theme.apply {
|
||||
resolveAttribute(R.attr.colorPrimaryTranslucent, colorPrimaryTranslucent, true)
|
||||
resolveAttribute(R.attr.colorCardBackground, colorCardBackground, true)
|
||||
resolveAttribute(R.attr.colorTextHintLighter, colorTextHintLighter, true)
|
||||
}
|
||||
// holder.binding.root.context.theme.apply {
|
||||
// resolveAttribute(com.google.android.material.R.attr.colorSecondaryContainer, colorPrimaryTranslucent, true)
|
||||
// resolveAttribute(R.attr.colorCardBackground, colorCardBackground, true)
|
||||
// resolveAttribute(R.attr.colorTextHintLighter, colorTextHintLighter, true)
|
||||
// }
|
||||
|
||||
/* Highlight the next upcoming course of the day if the day of the adapter matches the
|
||||
* current day, and if no other course has been highlighted, to avoid double highlighting.
|
||||
*/
|
||||
if (!isAnyCourseHighlighted && currentItem.isCurrentCourse(currentCalendar)) {
|
||||
// Ensure that no other course will be highlighted
|
||||
isAnyCourseHighlighted = true
|
||||
|
||||
holder.binding.cardBackground.apply {
|
||||
// Set the card's background colour to a desaturated shade of the primary colour
|
||||
backgroundTintList = ColorStateList.valueOf(colorPrimaryTranslucent.data)
|
||||
|
||||
// Hide card stroke
|
||||
strokeColor = context.getColor(android.R.color.transparent)
|
||||
}
|
||||
// Otherwise, apply colours to ensure that the item will not be highlighted
|
||||
} else {
|
||||
holder.binding.cardBackground.apply {
|
||||
// Set the card's background colour to its default value
|
||||
backgroundTintList = ColorStateList.valueOf(colorCardBackground.data)
|
||||
|
||||
// Set the card's stroke to its default colour
|
||||
strokeColor = colorTextHintLighter.data
|
||||
}
|
||||
}
|
||||
// if (!isAnyCourseHighlighted && currentItem.isCurrentCourse(currentCalendar)) {
|
||||
// // Ensure that no other course will be highlighted
|
||||
// isAnyCourseHighlighted = true
|
||||
//
|
||||
// holder.binding.cardBackground.apply {
|
||||
// // Set the card's background colour to a desaturated shade of the primary colour
|
||||
// backgroundTintList = ColorStateList.valueOf(colorPrimaryTranslucent.data)
|
||||
//
|
||||
// // Hide card stroke
|
||||
// strokeColor = context.getColor(android.R.color.transparent)
|
||||
// }
|
||||
// // Otherwise, apply colours to ensure that the item will not be highlighted
|
||||
// } else {
|
||||
// holder.binding.cardBackground.apply {
|
||||
// // Set the card's background colour to its default value
|
||||
// backgroundTintList = ColorStateList.valueOf(colorCardBackground.data)
|
||||
//
|
||||
// // Set the card's stroke to its default colour
|
||||
// strokeColor = colorTextHintLighter.data
|
||||
// }
|
||||
// }
|
||||
|
||||
// Set up single click listener
|
||||
holder.binding.cardBackground.setOnClickListener {
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.denizk0461.studip.databinding.ItemScrollablePageBinding
|
||||
*/
|
||||
class StudIPEventPageAdapter(
|
||||
private var events: List<StudIPEvent>,
|
||||
private val onClickListener: StudIPEventItemAdapter.OnClickListener
|
||||
private val onClickListener: StudIPEventItemAdapter.OnClickListener,
|
||||
) : RecyclerView.Adapter<StudIPEventPageAdapter.EventPageViewHolder>() {
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.denizk0461.studip.data
|
||||
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.DefaultLifecycleObserver
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import kotlin.properties.ReadOnlyProperty
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
// written by Zhuinden (props to them!)
|
||||
class FragmentViewBindingDelegate<T : ViewBinding>(
|
||||
val fragment: Fragment,
|
||||
val viewBindingFactory: (View) -> T
|
||||
) : ReadOnlyProperty<Fragment, T> {
|
||||
private var _binding: T? = null
|
||||
|
||||
init {
|
||||
fragment.lifecycle.addObserver(object : DefaultLifecycleObserver {
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
fragment.viewLifecycleOwnerLiveData.observe(fragment) { viewLifecycleOwner ->
|
||||
viewLifecycleOwner.lifecycle.addObserver(object : DefaultLifecycleObserver {
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
_binding = null
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun getValue(thisRef: Fragment, property: KProperty<*>): T {
|
||||
val binding = _binding
|
||||
if (binding != null) {
|
||||
return binding
|
||||
}
|
||||
|
||||
val lifecycle = fragment.viewLifecycleOwner.lifecycle
|
||||
if (!lifecycle.currentState.isAtLeast(Lifecycle.State.INITIALIZED)) {
|
||||
throw IllegalStateException("Should not attempt to get bindings when Fragment views are destroyed.")
|
||||
}
|
||||
|
||||
return viewBindingFactory(thisRef.requireView()).also { _binding = it }
|
||||
}
|
||||
}
|
||||
|
||||
fun <T : ViewBinding> Fragment.viewBinding(viewBindingFactory: (View) -> T) =
|
||||
FragmentViewBindingDelegate(this, viewBindingFactory)
|
||||
@@ -209,9 +209,9 @@ class StwParser {
|
||||
* pointless to the website user. As of now, this information is discarded in the app.
|
||||
* TODO implement allergen functionality
|
||||
*/
|
||||
while (text.contains("<sup>")) {
|
||||
text = text.substring(0 until text.indexOf("<sup>")) + text.substring(text.indexOf("</sup>")+6 until text.length)
|
||||
}
|
||||
// while (text.contains("<sup>")) {
|
||||
// text = text.substring(0 until text.indexOf("<sup>")) + text.substring(text.indexOf("</sup>")+6 until text.length)
|
||||
// }
|
||||
|
||||
// Return the stripped and updated HTML string
|
||||
return text
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.denizk0461.studip.fragment
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.denizk0461.studip.sheet.AppSheet
|
||||
|
||||
/**
|
||||
* Fragment super class providing common functionality. Fragments are used for providing the user
|
||||
* with different views and functionality. All fragments should inherit from this.
|
||||
*/
|
||||
open class AppFragment : Fragment() {
|
||||
|
||||
/**
|
||||
* Opens a bottom sheet. Sheet must be a subclass of [com.denizk0461.studip.sheet.AppSheet].
|
||||
*
|
||||
* @param sheet element that will be displayed
|
||||
*/
|
||||
protected fun openBottomSheet(sheet: AppSheet) {
|
||||
sheet.show((context as FragmentActivity).supportFragmentManager, sheet.javaClass.simpleName)
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,12 @@ import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.denizk0461.studip.adapter.CanteenOfferItemAdapter
|
||||
import com.denizk0461.studip.adapter.CanteenOfferPageAdapter
|
||||
import com.denizk0461.studip.databinding.FragmentCanteenBinding
|
||||
import com.denizk0461.studip.model.*
|
||||
import com.denizk0461.studip.sheet.AllergenSheet
|
||||
import com.denizk0461.studip.viewmodel.CanteenViewModel
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
|
||||
@@ -17,7 +18,7 @@ import com.google.android.material.tabs.TabLayoutMediator
|
||||
* User-facing fragment view that displays the canteen offers from the website of the
|
||||
* Studierendenwerk Bremen.
|
||||
*/
|
||||
class CanteenFragment : Fragment() {
|
||||
class CanteenFragment : AppFragment(), CanteenOfferItemAdapter.OnClickListener {
|
||||
|
||||
// Nullable view binding reference
|
||||
private var _binding: FragmentCanteenBinding? = null
|
||||
@@ -91,7 +92,7 @@ class CanteenFragment : Fragment() {
|
||||
}
|
||||
|
||||
// Set up the view pager's adapter
|
||||
viewPagerAdapter = CanteenOfferPageAdapter(listOf(), 0)
|
||||
viewPagerAdapter = CanteenOfferPageAdapter(listOf(), 0, this)
|
||||
|
||||
// Assign the adapter to the view pager
|
||||
binding.viewPager.adapter = viewPagerAdapter
|
||||
@@ -268,4 +269,23 @@ class CanteenFragment : Fragment() {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executed when an item has been clicked.
|
||||
*
|
||||
* @param offer item that has been clicked
|
||||
*/
|
||||
override fun onClick(offer: CanteenOfferGroupElement) {
|
||||
openBottomSheet(AllergenSheet(offer))
|
||||
}
|
||||
|
||||
/**
|
||||
* Executed when an item has been long-pressed.
|
||||
*
|
||||
* @param offer item that has been long-pressed
|
||||
* @return whether the long press was successful
|
||||
*/
|
||||
override fun onLongClick(offer: CanteenOfferGroupElement): Boolean {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.denizk0461.studip.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@@ -18,7 +17,7 @@ import java.util.*
|
||||
/**
|
||||
* User-facing fragment view that displays the user's Stud.IP schedule.
|
||||
*/
|
||||
class EventFragment : Fragment() {
|
||||
class EventFragment : AppFragment() {
|
||||
|
||||
// Nullable view binding reference
|
||||
private var _binding: FragmentEventBinding? = null
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.denizk0461.studip.BuildConfig
|
||||
import com.denizk0461.studip.activity.FetcherActivity
|
||||
import com.denizk0461.studip.databinding.FragmentSettingsBinding
|
||||
@@ -15,7 +14,7 @@ import com.denizk0461.studip.databinding.FragmentSettingsBinding
|
||||
/**
|
||||
* User-facing fragment view that is used to change app settings.
|
||||
*/
|
||||
class SettingsFragment : Fragment() {
|
||||
class SettingsFragment : AppFragment() {
|
||||
|
||||
// Nullable view binding reference
|
||||
private var _binding: FragmentSettingsBinding? = null
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.denizk0461.studip.sheet
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.denizk0461.studip.R
|
||||
import com.denizk0461.studip.data.viewBinding
|
||||
import com.denizk0461.studip.databinding.SheetAllergenBinding
|
||||
import com.denizk0461.studip.model.CanteenOfferGroupElement
|
||||
|
||||
class AllergenSheet(private val offer: CanteenOfferGroupElement) : AppSheet(R.layout.sheet_allergen) {
|
||||
|
||||
private val binding: SheetAllergenBinding by viewBinding(SheetAllergenBinding::bind)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.apply {
|
||||
title.text = offer.title
|
||||
textContent.text = "hello there"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.denizk0461.studip.sheet
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.LayoutRes
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
|
||||
/**
|
||||
* Bottom sheet super class providing common functionality. All bottom sheets should inherit from
|
||||
* this.
|
||||
*
|
||||
* @param layoutId ID of the layout of the bottom sheet
|
||||
*/
|
||||
open class AppSheet(@LayoutRes private val layoutId: Int) : BottomSheetDialogFragment() {
|
||||
|
||||
// Internal context object
|
||||
private lateinit var _context: Context
|
||||
|
||||
// Get non-null context. Only valid after onAttach()
|
||||
override fun getContext(): Context = _context
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
_context = context
|
||||
}
|
||||
|
||||
// Inflate the given layout
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View =
|
||||
LayoutInflater.from(context).inflate(layoutId, container, false)
|
||||
}
|
||||
+1
-1
@@ -16,7 +16,7 @@ import kotlinx.coroutines.runBlocking
|
||||
*
|
||||
* @param app reference to the app
|
||||
*/
|
||||
open class TemplateViewModel(app: Application) : AndroidViewModel(app) {
|
||||
open class AppViewModel(app: Application) : AndroidViewModel(app) {
|
||||
|
||||
// Reference to the app's repository for database transactions
|
||||
protected val repo: AppRepository = Dependencies.repo
|
||||
@@ -13,7 +13,7 @@ import com.denizk0461.studip.model.OfferDate
|
||||
*
|
||||
* @param app reference to the app
|
||||
*/
|
||||
class CanteenViewModel(app: Application) : TemplateViewModel(app) {
|
||||
class CanteenViewModel(app: Application) : AppViewModel(app) {
|
||||
|
||||
// Instantiate a parser, should the user want to refresh the canteen offers
|
||||
private val parser = StwParser()
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.denizk0461.studip.model.StudIPEvent
|
||||
*
|
||||
* @param app reference to the app
|
||||
*/
|
||||
class EventViewModel(app: Application) : TemplateViewModel(app) {
|
||||
class EventViewModel(app: Application) : AppViewModel(app) {
|
||||
|
||||
/**
|
||||
* Retrieves all Stud.IP events.
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.denizk0461.studip.model.StudIPEvent
|
||||
*
|
||||
* @param app reference to the app
|
||||
*/
|
||||
class FetcherViewModel(app: Application) : TemplateViewModel(app) {
|
||||
class FetcherViewModel(app: Application) : AppViewModel(app) {
|
||||
|
||||
/**
|
||||
* Save a list of Stud.IP events to persistent storage asynchronously.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="?attr/colorPrimary" />
|
||||
<!-- <item android:state_checked="false" android:color="@color/your_color"/>-->
|
||||
</selector>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorCardBackground"/>
|
||||
</selector>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorPrimaryTranslucent"/>
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="?attr/colorPrimaryTranslucent" />
|
||||
<item android:color="?attr/colorBackground" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@android:color/transparent" />
|
||||
<item android:color="?attr/colorTextHintLighter" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="?attr/colorOnPrimary" />
|
||||
<item android:color="?attr/colorTextHint" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="?attr/colorText" />
|
||||
<item android:color="?attr/colorTextHint" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="?attr/colorPrimary" />
|
||||
<item android:color="?attr/colorTextHint" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="?attr/colorText" />
|
||||
<item android:color="?attr/colorTextHint" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="?attr/colorPrimary" />
|
||||
<item android:color="?attr/colorSwitchTrack" />
|
||||
</selector>
|
||||
@@ -2,8 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorBackground">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
android:background="?attr/colorBackground">
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/toolbar"
|
||||
@@ -13,8 +12,7 @@
|
||||
android:fitsSystemWindows="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="?attr/colorBackground">
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_title_bar"
|
||||
@@ -45,21 +43,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:menu="@menu/nav_view_items"
|
||||
app:labelVisibilityMode="selected"
|
||||
app:itemActiveIndicatorStyle="@style/NavigationViewItemIndicator"
|
||||
app:itemTextColor="@color/list_nav_bar_text"
|
||||
app:itemIconTint="@color/list_nav_bar_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="?attr/colorBackground"/>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
style="@style/DividerTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/nav_view"/>
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -2,16 +2,13 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorBackground"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/day_tab_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabMode="scrollable"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
@@ -52,74 +49,73 @@
|
||||
android:id="@+id/chips_preference"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_fair"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_fair"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_fish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_fish"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_poultry"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_poultry"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_lamb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_lamb"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_vital"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_vital"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_beef"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_beef"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_pork"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_pork"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_vegetarian"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_vegetarian"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_vegan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_vegan"/>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
style="@style/ChipStyle"
|
||||
style="@style/Widget.Material3.Chip.Filter"
|
||||
android:id="@+id/chip_pref_game"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".fragment.EventFragment"
|
||||
android:background="?attr/colorBackground">
|
||||
tools:context=".fragment.EventFragment">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/day_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabMode="scrollable"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".fragment.SettingsFragment"
|
||||
android:background="?attr/colorBackground">
|
||||
tools:context=".fragment.SettingsFragment">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
@@ -17,8 +16,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
style="@style/Widget.Material3.CardView.Outlined"
|
||||
android:backgroundTint="?attr/colorCardBackground">
|
||||
style="@style/Widget.Material3.CardView.Outlined">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
@@ -45,14 +43,14 @@
|
||||
<!-- App version -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/button_refresh_schedule"
|
||||
android:background="@drawable/layout_ripple"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
android:paddingVertical="8dp"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -103,7 +101,6 @@
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
style="@style/SwitchTheme"
|
||||
android:id="@+id/switch_quarter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -147,7 +144,6 @@
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
style="@style/SwitchTheme"
|
||||
android:id="@+id/switch_highlight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -163,11 +159,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/layout_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
android:paddingVertical="8dp"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -190,11 +186,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/layout_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
android:paddingVertical="8dp"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -9,14 +9,11 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3.CardView.Outlined"
|
||||
android:backgroundTint="?attr/colorCardBackground"
|
||||
app:strokeColor="?attr/colorTextHintLighter">
|
||||
style="@style/Widget.Material3.CardView.Outlined">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<!-- android:padding="16dp"-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_category"
|
||||
@@ -42,11 +39,6 @@
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/temp_content"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"/>-->
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/layout_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="2dp">
|
||||
android:paddingVertical="2dp"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/image_view_container"
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
android:id="@+id/card_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3.CardView.Outlined"
|
||||
android:backgroundTint="@color/card_background_default">
|
||||
style="@style/Widget.Material3.CardView.Outlined">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:scaleType="centerInside"
|
||||
app:tint="?attr/colorText"/>
|
||||
app:tint="?attr/colorOnSurfaceVariant" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="22sp"
|
||||
android:fontFamily="@font/lato_bolditalic"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginHorizontal="24dp"/>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:paddingBottom="16dp"/>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,36 +1,37 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.StudIPTimetable" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<style name="Base.Theme.StudIPTimetable" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<item name="colorPrimary">@color/md_theme_dark_primary</item>
|
||||
<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/md_theme_dark_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/md_theme_dark_secondary</item>
|
||||
<item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/md_theme_dark_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item>
|
||||
<item name="colorError">@color/md_theme_dark_error</item>
|
||||
<item name="colorErrorContainer">@color/md_theme_dark_errorContainer</item>
|
||||
<item name="colorOnError">@color/md_theme_dark_onError</item>
|
||||
<item name="colorOnErrorContainer">@color/md_theme_dark_onErrorContainer</item>
|
||||
<item name="android:colorBackground">@color/md_theme_dark_background</item>
|
||||
<item name="colorOnBackground">@color/md_theme_dark_onBackground</item>
|
||||
<item name="colorSurface">@color/md_theme_dark_surface</item>
|
||||
<item name="colorOnSurface">@color/md_theme_dark_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/md_theme_dark_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/md_theme_dark_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/md_theme_dark_outline</item>
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
|
||||
|
||||
<item name="colorPrimary">@color/primaryNight</item>
|
||||
<item name="colorPrimaryTranslucent">@color/primaryNightTranslucent</item>
|
||||
<item name="rippleColor">@color/primaryNight</item>
|
||||
|
||||
<item name="colorOnPrimary">@color/colorTextNight</item>
|
||||
|
||||
<item name="colorText">@color/colorTextNight</item>
|
||||
<item name="colorTextHint">@color/colorTextHintNight</item>
|
||||
<item name="colorTextHintLighter">@color/colorTextHintLighterNight</item>
|
||||
|
||||
<item name="colorBackground">@color/colorBackgroundNight</item>
|
||||
<item name="colorCardBackground">@color/colorCardBackgroundNight</item>
|
||||
<item name="colorSwitchTrack">@color/colorSwitchTrackNight</item>
|
||||
|
||||
<item name="android:textColor">?attr/colorText</item>
|
||||
|
||||
<item name="android:windowBackground">@color/colorBackgroundNight</item>
|
||||
<item name="colorNavHighlight">@color/highlightNight</item>
|
||||
</style>
|
||||
|
||||
<!-- <style name="NavigationViewItemIndicator" parent="Widget.Material3.BottomNavigationView.ActiveIndicator">-->
|
||||
<!-- <item name="android:color">@color/primaryNight</item>-->
|
||||
<!-- </style>-->
|
||||
|
||||
<style name="SelectableItemTheme">
|
||||
<item name="colorControlHighlight">@color/primaryNight</item>
|
||||
<item name="android:textColor">@color/md_theme_dark_onSurfaceVariant</item>
|
||||
</style>
|
||||
|
||||
<style name="DividerTheme" parent="Widget.Material3.MaterialDivider">
|
||||
<item name="dividerColor">@color/colorTextHintLighterNight</item>
|
||||
<item name="dividerColor">@color/md_theme_dark_outlineVariant</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,35 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<!-- auto-generated using https://m3.material.io/theme-builder#/custom -->
|
||||
<color name="seed">#c85848</color>
|
||||
<color name="md_theme_light_primary">#A33D2F</color>
|
||||
<color name="md_theme_light_onPrimary">#FFFFFF</color>
|
||||
<color name="md_theme_light_primaryContainer">#FFDAD4</color>
|
||||
<color name="md_theme_light_onPrimaryContainer">#410000</color>
|
||||
<color name="md_theme_light_secondary">#775651</color>
|
||||
<color name="md_theme_light_onSecondary">#FFFFFF</color>
|
||||
<color name="md_theme_light_secondaryContainer">#FFDAD4</color>
|
||||
<color name="md_theme_light_onSecondaryContainer">#2C1511</color>
|
||||
<color name="md_theme_light_tertiary">#705C2E</color>
|
||||
<color name="md_theme_light_onTertiary">#FFFFFF</color>
|
||||
<color name="md_theme_light_tertiaryContainer">#FBDFA6</color>
|
||||
<color name="md_theme_light_onTertiaryContainer">#251A00</color>
|
||||
<color name="md_theme_light_error">#BA1A1A</color>
|
||||
<color name="md_theme_light_errorContainer">#FFDAD6</color>
|
||||
<color name="md_theme_light_onError">#FFFFFF</color>
|
||||
<color name="md_theme_light_onErrorContainer">#410002</color>
|
||||
<color name="md_theme_light_background">#FFFBFF</color>
|
||||
<color name="md_theme_light_onBackground">#201A19</color>
|
||||
<color name="md_theme_light_surface">#FFFBFF</color>
|
||||
<color name="md_theme_light_onSurface">#201A19</color>
|
||||
<color name="md_theme_light_surfaceVariant">#F5DDDA</color>
|
||||
<color name="md_theme_light_onSurfaceVariant">#534341</color>
|
||||
<color name="md_theme_light_outline">#857370</color>
|
||||
<color name="md_theme_light_inverseOnSurface">#FBEEEC</color>
|
||||
<color name="md_theme_light_inverseSurface">#362F2E</color>
|
||||
<color name="md_theme_light_inversePrimary">#FFB4A8</color>
|
||||
<color name="md_theme_light_shadow">#000000</color>
|
||||
<color name="md_theme_light_surfaceTint">#A33D2F</color>
|
||||
<color name="md_theme_light_outlineVariant">#D8C2BE</color>
|
||||
<color name="md_theme_light_scrim">#000000</color>
|
||||
<color name="md_theme_dark_primary">#FFB4A8</color>
|
||||
<color name="md_theme_dark_onPrimary">#630E07</color>
|
||||
<color name="md_theme_dark_primaryContainer">#83251A</color>
|
||||
<color name="md_theme_dark_onPrimaryContainer">#FFDAD4</color>
|
||||
<color name="md_theme_dark_secondary">#E7BDB6</color>
|
||||
<color name="md_theme_dark_onSecondary">#442925</color>
|
||||
<color name="md_theme_dark_secondaryContainer">#5D3F3A</color>
|
||||
<color name="md_theme_dark_onSecondaryContainer">#FFDAD4</color>
|
||||
<color name="md_theme_dark_tertiary">#DEC48C</color>
|
||||
<color name="md_theme_dark_onTertiary">#3E2E04</color>
|
||||
<color name="md_theme_dark_tertiaryContainer">#564419</color>
|
||||
<color name="md_theme_dark_onTertiaryContainer">#FBDFA6</color>
|
||||
<color name="md_theme_dark_error">#FFB4AB</color>
|
||||
<color name="md_theme_dark_errorContainer">#93000A</color>
|
||||
<color name="md_theme_dark_onError">#690005</color>
|
||||
<color name="md_theme_dark_onErrorContainer">#FFDAD6</color>
|
||||
<color name="md_theme_dark_background">#201A19</color>
|
||||
<color name="md_theme_dark_onBackground">#EDE0DD</color>
|
||||
<color name="md_theme_dark_surface">#201A19</color>
|
||||
<color name="md_theme_dark_onSurface">#EDE0DD</color>
|
||||
<color name="md_theme_dark_surfaceVariant">#534341</color>
|
||||
<color name="md_theme_dark_onSurfaceVariant">#D8C2BE</color>
|
||||
<color name="md_theme_dark_outline">#A08C89</color>
|
||||
<color name="md_theme_dark_inverseOnSurface">#201A19</color>
|
||||
<color name="md_theme_dark_inverseSurface">#EDE0DD</color>
|
||||
<color name="md_theme_dark_inversePrimary">#A33D2F</color>
|
||||
<color name="md_theme_dark_shadow">#000000</color>
|
||||
<color name="md_theme_dark_surfaceTint">#FFB4A8</color>
|
||||
<color name="md_theme_dark_outlineVariant">#534341</color>
|
||||
<color name="md_theme_dark_scrim">#000000</color>
|
||||
|
||||
<!-- OBSOLETE: custom defined colours -->
|
||||
|
||||
<!-- <color name="black">#FF000000</color>-->
|
||||
<!-- <color name="white">#FFFFFFFF</color>-->
|
||||
<color name="brightfuckingpink">#FF46BB</color> <!-- for debug purposes -->
|
||||
|
||||
<!-- colours i defined -->
|
||||
<color name="primaryDay">#B2665A</color>
|
||||
<color name="primaryDayTranslucent">#80B2665A</color>
|
||||
<color name="primaryNight">#995348</color>
|
||||
<color name="primaryNightTranslucent">#80995348</color>
|
||||
<!-- <!– colours i defined –>-->
|
||||
<!-- <color name="primaryDay">#B2665A</color>-->
|
||||
<!-- <color name="primaryDayTranslucent">#80B2665A</color>-->
|
||||
<!-- <color name="primaryNight">#995348</color>-->
|
||||
<!-- <color name="primaryNightTranslucent">#80995348</color>-->
|
||||
|
||||
<color name="highlightDay">#871D1E</color>
|
||||
<color name="highlightNight">#CB9890</color>
|
||||
<!-- <color name="highlightDay">#871D1E</color>-->
|
||||
<!-- <color name="highlightNight">#CB9890</color>-->
|
||||
|
||||
<color name="colorTextDay">#141414</color>
|
||||
<color name="colorTextNight">#CDCBCB</color>
|
||||
<!-- <color name="colorTextDay">#141414</color>-->
|
||||
<!-- <color name="colorTextNight">#CDCBCB</color>-->
|
||||
|
||||
<color name="colorTextHintDay">#2A2828</color>
|
||||
<color name="colorTextHintNight">#B9B6B6</color>
|
||||
<!-- <color name="colorTextHintDay">#2A2828</color>-->
|
||||
<!-- <color name="colorTextHintNight">#B9B6B6</color>-->
|
||||
|
||||
<color name="colorTextHintLighterDay">#AFACAC</color>
|
||||
<color name="colorTextHintLighterNight">#5E5A5A</color>
|
||||
<!-- <color name="colorTextHintLighterDay">#AFACAC</color>-->
|
||||
<!-- <color name="colorTextHintLighterNight">#5E5A5A</color>-->
|
||||
|
||||
<color name="colorBackgroundDay">#EBEBEB</color>
|
||||
<color name="colorBackgroundNight">#151414</color>
|
||||
<!-- <color name="colorBackgroundDay">#EBEBEB</color>-->
|
||||
<!-- <color name="colorBackgroundNight">#151414</color>-->
|
||||
|
||||
<color name="colorCardBackgroundDay">#E0E0E0</color>
|
||||
<color name="colorCardBackgroundNight">#1F1E1E</color>
|
||||
<!-- <color name="colorCardBackgroundDay">#E0E0E0</color>-->
|
||||
<!-- <color name="colorCardBackgroundNight">#1F1E1E</color>-->
|
||||
|
||||
<color name="colorSwitchTrackDay">#D6D6D6</color>
|
||||
<color name="colorSwitchTrackNight">#2A2828</color>
|
||||
<!-- <color name="colorSwitchTrackDay">#D6D6D6</color>-->
|
||||
<!-- <color name="colorSwitchTrackNight">#2A2828</color>-->
|
||||
|
||||
<!-- <color name="colorPrimaryOnContrastLight">#E6898B</color>-->
|
||||
<!-- <color name="colorPrimaryOnContrastDark">#B77166</color>-->
|
||||
|
||||
@@ -1,53 +1,39 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.StudIPTimetable" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- <item name="fontFamily">@font/lato_regular</item>-->
|
||||
<style name="Base.Theme.StudIPTimetable" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/md_theme_light_primary</item>
|
||||
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/md_theme_light_secondary</item>
|
||||
<item name="colorOnSecondary">@color/md_theme_light_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/md_theme_light_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/md_theme_light_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/md_theme_light_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/md_theme_light_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/md_theme_light_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/md_theme_light_onTertiaryContainer</item>
|
||||
<item name="colorError">@color/md_theme_light_error</item>
|
||||
<item name="colorErrorContainer">@color/md_theme_light_errorContainer</item>
|
||||
<item name="colorOnError">@color/md_theme_light_onError</item>
|
||||
<item name="colorOnErrorContainer">@color/md_theme_light_onErrorContainer</item>
|
||||
<item name="android:colorBackground">@color/md_theme_light_background</item>
|
||||
<item name="colorOnBackground">@color/md_theme_light_onBackground</item>
|
||||
<item name="colorSurface">@color/md_theme_light_surface</item>
|
||||
<item name="colorOnSurface">@color/md_theme_light_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/md_theme_light_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/md_theme_light_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/md_theme_light_outline</item>
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
|
||||
|
||||
<item name="colorPrimary">@color/primaryDay</item>
|
||||
<item name="colorPrimaryTranslucent">@color/primaryDayTranslucent</item>
|
||||
<item name="rippleColor">@color/primaryDay</item>
|
||||
|
||||
<item name="colorOnPrimary">@color/colorBackgroundDay</item>
|
||||
|
||||
<item name="colorText">@color/colorTextDay</item>
|
||||
<item name="colorTextHint">@color/colorTextHintDay</item>
|
||||
<item name="colorTextHintLighter">@color/colorTextHintLighterDay</item>
|
||||
|
||||
<item name="colorBackground">@color/colorBackgroundDay</item>
|
||||
<item name="colorCardBackground">@color/colorCardBackgroundDay</item>
|
||||
<item name="colorSwitchTrack">@color/colorSwitchTrackDay</item>
|
||||
|
||||
<item name="android:textColor">?attr/colorText</item>
|
||||
|
||||
<item name="android:windowBackground">@color/colorBackgroundDay</item>
|
||||
<item name="colorNavHighlight">@color/highlightDay</item>
|
||||
<item name="android:textColor">@color/md_theme_light_onSurfaceVariant</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.StudIPTimetable" parent="Base.Theme.StudIPTimetable" />
|
||||
|
||||
<style name="SwitchTheme" parent="Widget.Material3.CompoundButton.MaterialSwitch">
|
||||
<item name="thumbTint">@color/list_switch_thumb</item>
|
||||
<item name="trackTint">@color/list_switch_track</item>
|
||||
<item name="trackDecorationTint">@color/list_switch_decoration</item>
|
||||
</style>
|
||||
|
||||
<style name="NavigationViewItemIndicator" parent="Widget.Material3.BottomNavigationView.ActiveIndicator">
|
||||
<item name="android:color">@color/primaryDayTranslucent</item>
|
||||
</style>
|
||||
|
||||
<style name="SelectableItemTheme">
|
||||
<item name="colorControlHighlight">@color/primaryDay</item>
|
||||
</style>
|
||||
|
||||
<style name="DividerTheme" parent="Widget.Material3.MaterialDivider">
|
||||
<item name="dividerColor">@color/colorTextHintLighterDay</item>
|
||||
</style>
|
||||
|
||||
<style name="ChipStyle" parent="Widget.Material3.Chip.Filter">
|
||||
<item name="chipStrokeColor">@color/item_chip_outline</item>
|
||||
<item name="android:textColor">?attr/colorText</item>
|
||||
<item name="rippleColor">?attr/colorPrimary</item>
|
||||
<item name="chipBackgroundColor">@color/item_chip_background</item>
|
||||
<item name="chipIconTint">?attr/colorText</item>
|
||||
<item name="dividerColor">@color/md_theme_light_outlineVariant</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user