phase 2 i forgor
@@ -10,7 +10,9 @@ import android.text.SpannableString
|
|||||||
import android.text.method.LinkMovementMethod
|
import android.text.method.LinkMovementMethod
|
||||||
import android.text.style.ClickableSpan
|
import android.text.style.ClickableSpan
|
||||||
import android.text.style.UnderlineSpan
|
import android.text.style.UnderlineSpan
|
||||||
|
import android.view.GestureDetector
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
@@ -18,9 +20,15 @@ import android.widget.TextView
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
|
import kotlin.math.abs
|
||||||
|
|
||||||
|
|
||||||
class AboutFragment : DialogFragment() {
|
class AboutFragment : DialogFragment() {
|
||||||
|
private lateinit var gestureDetector: GestureDetector
|
||||||
|
private var initialTouchY: Float = 0f
|
||||||
|
private val SWIPETHRESHOLD = 100
|
||||||
|
private val SWIPEVELOCITYTHRESHOLD = 100
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
||||||
@@ -32,6 +40,14 @@ class AboutFragment : DialogFragment() {
|
|||||||
): View? {
|
): View? {
|
||||||
val view = inflater.inflate(R.layout.activity_about, container, false)
|
val view = inflater.inflate(R.layout.activity_about, container, false)
|
||||||
|
|
||||||
|
// Set up GestureDetector
|
||||||
|
gestureDetector = GestureDetector(requireContext(), SwipeGestureListener())
|
||||||
|
|
||||||
|
// Attach the gesture detector to the root layout
|
||||||
|
view.setOnTouchListener { _, event ->
|
||||||
|
handleTouchEvent(event)
|
||||||
|
}
|
||||||
|
|
||||||
val link = view.findViewById<TextView>(R.id.link)
|
val link = view.findViewById<TextView>(R.id.link)
|
||||||
val underlinedText = SpannableString(link.text)
|
val underlinedText = SpannableString(link.text)
|
||||||
underlinedText.setSpan(UnderlineSpan(), 1, link.text.length, 0)
|
underlinedText.setSpan(UnderlineSpan(), 1, link.text.length, 0)
|
||||||
@@ -52,6 +68,7 @@ class AboutFragment : DialogFragment() {
|
|||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val dialog = super.onCreateDialog(savedInstanceState)
|
val dialog = super.onCreateDialog(savedInstanceState)
|
||||||
|
dialog.window?.attributes?.windowAnimations = R.style.Theme_Solen_DialogAnimation
|
||||||
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||||
dialog.setCancelable(true)
|
dialog.setCancelable(true)
|
||||||
|
|
||||||
@@ -80,4 +97,48 @@ class AboutFragment : DialogFragment() {
|
|||||||
link.text = spannable
|
link.text = spannable
|
||||||
link.movementMethod = LinkMovementMethod.getInstance()
|
link.movementMethod = LinkMovementMethod.getInstance()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inner class SwipeGestureListener : GestureDetector.SimpleOnGestureListener() {
|
||||||
|
override fun onDown(e: MotionEvent): Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFling(
|
||||||
|
e1: MotionEvent?,
|
||||||
|
e2: MotionEvent,
|
||||||
|
velocityX: Float,
|
||||||
|
velocityY: Float
|
||||||
|
): Boolean {
|
||||||
|
val diffY = e1?.let { e2.y.minus(it.y) } ?: 0f
|
||||||
|
if (diffY > SWIPETHRESHOLD && abs(velocityY) > SWIPEVELOCITYTHRESHOLD) {
|
||||||
|
// Swiped down
|
||||||
|
dismiss()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleTouchEvent(event: MotionEvent): Boolean {
|
||||||
|
when (event.action) {
|
||||||
|
MotionEvent.ACTION_DOWN -> {
|
||||||
|
initialTouchY = event.rawY
|
||||||
|
}
|
||||||
|
MotionEvent.ACTION_MOVE -> {
|
||||||
|
val deltaY = event.rawY - initialTouchY
|
||||||
|
dialog?.window?.attributes?.y = deltaY.toInt()
|
||||||
|
dialog?.window?.attributes?.windowAnimations = 0
|
||||||
|
dialog?.show()
|
||||||
|
|
||||||
|
// Check if the dialog has been dragged beyond a threshold and dismiss if necessary
|
||||||
|
if (deltaY > 200) {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MotionEvent.ACTION_UP -> {
|
||||||
|
initialTouchY = 0f
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,9 @@ import android.content.res.Resources
|
|||||||
import android.graphics.Typeface
|
import android.graphics.Typeface
|
||||||
import android.graphics.drawable.GradientDrawable
|
import android.graphics.drawable.GradientDrawable
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.os.Handler
|
||||||
|
import android.os.Looper
|
||||||
|
import android.util.Log
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@@ -21,8 +24,17 @@ import androidx.core.content.res.ResourcesCompat
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||||
import androidx.viewpager2.widget.ViewPager2
|
import androidx.viewpager2.widget.ViewPager2
|
||||||
|
import kotlinx.coroutines.coroutineScope
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import java.time.DayOfWeek
|
||||||
|
import java.time.LocalDate
|
||||||
|
import java.time.LocalTime
|
||||||
|
|
||||||
class CalWeekFragment : Fragment() {
|
class CalWeekFragment : Fragment() {
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
@@ -33,10 +45,11 @@ class CalWeekFragment : Fragment() {
|
|||||||
val view = inflater.inflate(R.layout.activity_cal_week, container, false)
|
val view = inflater.inflate(R.layout.activity_cal_week, container, false)
|
||||||
|
|
||||||
val viewPager: ViewPager2 = view.findViewById(R.id.dayPager)
|
val viewPager: ViewPager2 = view.findViewById(R.id.dayPager)
|
||||||
|
|
||||||
val adapter = DayPagerAdapter(childFragmentManager, viewLifecycleOwner.lifecycle)
|
val adapter = DayPagerAdapter(childFragmentManager, viewLifecycleOwner.lifecycle)
|
||||||
|
|
||||||
for (i in 0 until Vars.days.size) {
|
for (i in 0 until Vars.days.size) {
|
||||||
adapter.addFragment(DayFragment(i))
|
adapter.addFragment(DayFragment(i, view))
|
||||||
}
|
}
|
||||||
|
|
||||||
viewPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
viewPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
||||||
@@ -47,8 +60,11 @@ class CalWeekFragment : Fragment() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
viewPager.adapter = adapter
|
viewPager.adapter = adapter
|
||||||
|
viewPager.offscreenPageLimit = adapter.itemCount
|
||||||
viewPager.currentItem = Vars.selectedDay
|
viewPager.currentItem = Vars.selectedDay
|
||||||
|
|
||||||
|
view.tag = "timetable_root"
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,7 +87,9 @@ class DayPagerAdapter(fragmentManager: FragmentManager, lifecycle: Lifecycle) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
class DayFragment(private val position: Int, private val rootView: View) : Fragment(R.layout.fragment_day) {
|
||||||
|
private val handler = Handler(Looper.getMainLooper())
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
@@ -79,25 +97,165 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
|||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View? {
|
): View? {
|
||||||
val view = inflater.inflate(R.layout.fragment_day, container, false)
|
val view = inflater.inflate(R.layout.fragment_day, container, false)
|
||||||
|
view.tag = "day_${position}_root"
|
||||||
|
|
||||||
val dayLayout: LinearLayout = view.findViewById(R.id.layoutDayMain)
|
val dayLayout: LinearLayout = view.findViewById(R.id.layoutDayMain)
|
||||||
|
dayLayout.tag = "day_${position}_layout"
|
||||||
Vars.dayMap[position]?.let { createDayView(it, dayLayout, resources) }
|
Vars.dayMap[position]?.let { createDayView(it, dayLayout, resources) }
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun highlightCurrent(
|
||||||
|
subj: Subject,
|
||||||
|
day: Day,
|
||||||
|
subjectDrawable: GradientDrawable,
|
||||||
|
subjectStroke: Int,
|
||||||
|
i: Int
|
||||||
|
) {
|
||||||
|
handler.postDelayed(object : Runnable {
|
||||||
|
override fun run() {
|
||||||
|
subjectDrawable.setStroke(0, 0)
|
||||||
|
|
||||||
|
var now = LocalTime.now()
|
||||||
|
var nowD = LocalDate.now().dayOfMonth
|
||||||
|
var nowH = now.hour
|
||||||
|
var nowM = now.minute
|
||||||
|
var nowT = LocalTime.of(nowH, nowM)
|
||||||
|
|
||||||
|
lateinit var subjST: LocalTime
|
||||||
|
lateinit var subjET: LocalTime
|
||||||
|
val subjD = day.date.split(".")[0].toInt()
|
||||||
|
|
||||||
|
if ("T" !in subj.start && "T" !in subj.end) {
|
||||||
|
val subjSH = subj.start.split(":")[0].toInt()
|
||||||
|
val subjSM = subj.start.split(":")[1].toInt()
|
||||||
|
|
||||||
|
val subjEH = subj.end.split(":")[0].toInt()
|
||||||
|
val subjEM = subj.end.split(":")[1].toInt()
|
||||||
|
|
||||||
|
subjST = LocalTime.of(subjSH, subjSM)
|
||||||
|
subjET = LocalTime.of(subjEH, subjEM)
|
||||||
|
} else {
|
||||||
|
val subjSH = subj.start
|
||||||
|
.split("T")[1]
|
||||||
|
.split(":")[0]
|
||||||
|
.toInt()
|
||||||
|
val subjSM = subj.start
|
||||||
|
.split("T")[1]
|
||||||
|
.split(":")[1]
|
||||||
|
.toInt()
|
||||||
|
|
||||||
|
val subjEH = subj.end
|
||||||
|
.split("T")[1]
|
||||||
|
.split(":")[0]
|
||||||
|
.toInt()
|
||||||
|
val subjEM = subj.end
|
||||||
|
.split("T")[1]
|
||||||
|
.split(":")[1]
|
||||||
|
.toInt()
|
||||||
|
|
||||||
|
subjST = LocalTime.of(subjSH, subjSM)
|
||||||
|
subjET = LocalTime.of(subjEH, subjEM)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
nowT in subjST..subjET &&
|
||||||
|
nowD == subjD
|
||||||
|
) {
|
||||||
|
if (i < day.subjects.size - 1 && !day.subjects[i + 1].free && !subj.free) {
|
||||||
|
subjectDrawable.setStroke(
|
||||||
|
10,
|
||||||
|
ContextCompat.getColor(
|
||||||
|
requireContext(),
|
||||||
|
subjectStroke
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else if (i < day.subjects.size - 1 && day.subjects[i + 1].free && nowT != subjET) {
|
||||||
|
subjectDrawable.setStroke(
|
||||||
|
10,
|
||||||
|
ContextCompat.getColor(
|
||||||
|
requireContext(),
|
||||||
|
subjectStroke
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else if (i < day.subjects.size - 1 && subj.free && !day.subjects[i + 1].free && nowT != subjET) {
|
||||||
|
subjectDrawable.setStroke(
|
||||||
|
10,
|
||||||
|
ContextCompat.getColor(
|
||||||
|
requireContext(),
|
||||||
|
subjectStroke
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else if (
|
||||||
|
nowD == subjD &&
|
||||||
|
i > 0
|
||||||
|
) {
|
||||||
|
lateinit var prevET: LocalTime
|
||||||
|
|
||||||
|
val prev = day.subjects[i - 1]
|
||||||
|
if ("T" !in prev.start && "T" !in prev.end) {
|
||||||
|
val prevEH = prev.end
|
||||||
|
.split(":")[0]
|
||||||
|
.toInt()
|
||||||
|
val prevEM = prev.end
|
||||||
|
.split(":")[1]
|
||||||
|
.toInt()
|
||||||
|
|
||||||
|
prevET = LocalTime.of(prevEH, prevEM)
|
||||||
|
} else {
|
||||||
|
val prevEH = prev.end
|
||||||
|
.split("T")[1]
|
||||||
|
.split(":")[0]
|
||||||
|
.toInt()
|
||||||
|
val prevEM = prev.end
|
||||||
|
.split("T")[1]
|
||||||
|
.split(":")[1]
|
||||||
|
.toInt()
|
||||||
|
|
||||||
|
prevET = LocalTime.of(prevEH, prevEM)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
nowT < subjST &&
|
||||||
|
nowT > prevET
|
||||||
|
) {
|
||||||
|
subjectDrawable.setStroke(
|
||||||
|
10,
|
||||||
|
ContextCompat.getColor(
|
||||||
|
requireContext(),
|
||||||
|
subjectStroke
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootView.postInvalidate()
|
||||||
|
handler.postDelayed(this, 40000L)
|
||||||
|
}
|
||||||
|
}, 0L)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
super.onDestroyView()
|
||||||
|
// Stop updating UI when the view is destroyed
|
||||||
|
handler.removeCallbacksAndMessages(null)
|
||||||
|
}
|
||||||
|
|
||||||
private fun createDayView(day: Day, rootLayout: LinearLayout, resources: Resources) {
|
private fun createDayView(day: Day, rootLayout: LinearLayout, resources: Resources) {
|
||||||
val customFont = context?.let { ResourcesCompat.getFont(it, R.font.roboto) }
|
val customFont = context?.let { ResourcesCompat.getFont(it, R.font.roboto) }
|
||||||
|
|
||||||
val scrollView = ScrollView(requireContext())
|
val scrollView = ScrollView(requireContext())
|
||||||
|
scrollView.scrollBarStyle = R.style.Theme_Solen_Scrollbar
|
||||||
|
|
||||||
val dayLayout = LinearLayout(requireContext())
|
val dayLayout = LinearLayout(requireContext())
|
||||||
dayLayout.orientation = LinearLayout.VERTICAL
|
dayLayout.orientation = LinearLayout.VERTICAL
|
||||||
|
|
||||||
val nameDateTextView = TextView(requireContext())
|
val nameDateTextView = TextView(requireContext())
|
||||||
val nameDateString = day.name + " " + day.date
|
nameDateTextView.text = "${day.name} ${day.date}"
|
||||||
nameDateTextView.typeface = customFont
|
nameDateTextView.setTypeface(customFont, Typeface.BOLD_ITALIC)
|
||||||
nameDateTextView.text = nameDateString
|
nameDateTextView.textSize = 27f
|
||||||
nameDateTextView.textSize = 30f
|
|
||||||
nameDateTextView.setTextColor(
|
nameDateTextView.setTextColor(
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
@@ -170,18 +328,17 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
|||||||
subjectBackground
|
subjectBackground
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
subjectDrawable.setStroke(
|
|
||||||
10,
|
// launch a periodic check for highlighting the current lecture
|
||||||
ContextCompat.getColor(
|
highlightCurrent(subj, day, subjectDrawable, subjectStroke, i)
|
||||||
requireContext(),
|
|
||||||
subjectStroke
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
val subjectLayout = LinearLayout(requireContext())
|
val subjectLayout = LinearLayout(requireContext())
|
||||||
subjectLayout.orientation = LinearLayout.HORIZONTAL
|
subjectLayout.orientation = LinearLayout.HORIZONTAL
|
||||||
subjectLayout.gravity = Gravity.CENTER_VERTICAL
|
subjectLayout.gravity = Gravity.CENTER_VERTICAL
|
||||||
subjectLayout.background = subjectDrawable
|
subjectLayout.background = subjectDrawable
|
||||||
|
// set the tag for later use (used as an id)
|
||||||
|
subjectLayout.tag = subj.number
|
||||||
|
|
||||||
val subjectNumberDrawable = GradientDrawable()
|
val subjectNumberDrawable = GradientDrawable()
|
||||||
subjectNumberDrawable.shape = GradientDrawable.RECTANGLE
|
subjectNumberDrawable.shape = GradientDrawable.RECTANGLE
|
||||||
@@ -192,13 +349,13 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
|||||||
subjectBackground
|
subjectBackground
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
subjectNumberDrawable.setStroke(
|
/*subjectNumberDrawable.setStroke(
|
||||||
10,
|
10,
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
subjectStroke
|
subjectStroke
|
||||||
)
|
)
|
||||||
)
|
)*/
|
||||||
|
|
||||||
val subjectNumberTextView = TextView(requireContext())
|
val subjectNumberTextView = TextView(requireContext())
|
||||||
subjectNumberTextView.typeface = customFont
|
subjectNumberTextView.typeface = customFont
|
||||||
@@ -309,7 +466,7 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
|||||||
val subjectTeacherTextView = TextView(requireContext())
|
val subjectTeacherTextView = TextView(requireContext())
|
||||||
subjectTeacherTextView.text = subj.teacher
|
subjectTeacherTextView.text = subj.teacher
|
||||||
subjectTeacherTextView.typeface = customFont
|
subjectTeacherTextView.typeface = customFont
|
||||||
subjectTeacherTextView.textSize = 15f
|
subjectTeacherTextView.textSize = 12f
|
||||||
subjectTeacherTextView.setPadding(10, 0, 20, 10)
|
subjectTeacherTextView.setPadding(10, 0, 20, 10)
|
||||||
subjectTeacherTextView.textAlignment = View.TEXT_ALIGNMENT_TEXT_END
|
subjectTeacherTextView.textAlignment = View.TEXT_ALIGNMENT_TEXT_END
|
||||||
subjectTeacherTextView.setTextColor(
|
subjectTeacherTextView.setTextColor(
|
||||||
@@ -395,7 +552,7 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
|||||||
dayLayout.addView(subjectSeparator)
|
dayLayout.addView(subjectSeparator)
|
||||||
} else if (i != 0) {
|
} else if (i != 0) {
|
||||||
val subjectSeparator = ImageView(requireContext())
|
val subjectSeparator = ImageView(requireContext())
|
||||||
subjectSeparator.setImageResource(R.drawable.squiggly_line_100x100)
|
subjectSeparator.setImageResource(R.drawable.squiggly_line_100_yellow_transparent_one_color_edge)
|
||||||
subjectSeparator.layoutParams = LinearLayout.LayoutParams(
|
subjectSeparator.layoutParams = LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
Util.pixelsToDp(20, resources)
|
Util.pixelsToDp(20, resources)
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
package com.odweta.solen
|
package com.odweta.solen
|
||||||
|
|
||||||
|
import android.app.Dialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
|
import android.widget.FrameLayout
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.transition.AutoTransition
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.fragment.app.DialogFragment
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import com.bumptech.glide.Glide
|
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
@@ -20,19 +26,39 @@ import kotlinx.coroutines.launch
|
|||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
interface MainActivityListener {
|
||||||
|
fun setupMain(view: View, savedInstanceState: Bundle?)
|
||||||
|
fun onSignIn(view: View, wantDelete: Boolean, dialog: Dialog?)
|
||||||
|
}
|
||||||
|
|
||||||
|
class MainActivity : AppCompatActivity(), MainActivityListener {
|
||||||
private var week: List<Day> = mutableListOf()
|
private var week: List<Day> = mutableListOf()
|
||||||
private var toastShowing: Boolean = false
|
private var toastShowing: Boolean = false
|
||||||
private var toastShown: Boolean = false
|
private var toastShown: Boolean = false
|
||||||
private var toast2Shown: Boolean = false
|
private var toast2Shown: Boolean = false
|
||||||
private var done: Boolean = false
|
private var done: Boolean = false
|
||||||
private lateinit var toolbar: TextView
|
|
||||||
private var role: String = " - Student"
|
private var role: String = " - Student"
|
||||||
private lateinit var navbar: BottomNavigationView
|
private lateinit var navbar: BottomNavigationView
|
||||||
|
private lateinit var toolbar: TextView
|
||||||
|
|
||||||
// @section COMPANION
|
// @section COMPANION
|
||||||
companion object {
|
companion object {
|
||||||
|
private var intfc: MainActivityListener? = null
|
||||||
|
|
||||||
|
fun setListener(context: Context) {
|
||||||
|
if (context is MainActivityListener) {
|
||||||
|
intfc = context
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun callSetupMain(view: View, savedInstanceState: Bundle?) {
|
||||||
|
intfc?.setupMain(view, savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun callOnSignIn(view: View, wantDelete: Boolean, dialog: Dialog?) {
|
||||||
|
intfc?.onSignIn(view, wantDelete, dialog)
|
||||||
|
}
|
||||||
|
|
||||||
fun quit(context: Context) {
|
fun quit(context: Context) {
|
||||||
// Create an Intent to launch the home screen
|
// Create an Intent to launch the home screen
|
||||||
val homeIntent = Intent(Intent.ACTION_MAIN)
|
val homeIntent = Intent(Intent.ACTION_MAIN)
|
||||||
@@ -65,43 +91,159 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun setupMain(view: View, savedInstanceState: Bundle?) {
|
||||||
|
toolbar = view.findViewById(R.id.toolbar)
|
||||||
|
|
||||||
|
if (
|
||||||
|
Util.fileToString(Vars.userDataFilePath) != "" &&
|
||||||
|
JSONObject(Util.fileToString(Vars.userDataFilePath)).has("fullName")
|
||||||
|
) {
|
||||||
|
toolbar.text =
|
||||||
|
JSONObject(Util.fileToString(Vars.userDataFilePath)).getString("fullName") +
|
||||||
|
role
|
||||||
|
} else {
|
||||||
|
toolbar.text = "Přihlašte se, prosím."
|
||||||
|
}
|
||||||
|
|
||||||
|
navbar = findViewById(R.id.bottomNav)
|
||||||
|
|
||||||
|
var frag = supportFragmentManager.findFragmentById(R.id.fragmentContainer)
|
||||||
|
|
||||||
|
if (!Vars.resetNav) {
|
||||||
|
if (frag == null || frag is CalWeekFragment) {
|
||||||
|
frag = CalWeekFragment()
|
||||||
|
navbar.selectedItemId = R.id.nav_timetable
|
||||||
|
}
|
||||||
|
if (frag is MarksFragment) {
|
||||||
|
frag = MarksFragment()
|
||||||
|
navbar.selectedItemId = R.id.nav_marks
|
||||||
|
}
|
||||||
|
if (frag is MenuFragment) {
|
||||||
|
frag = MenuFragment()
|
||||||
|
navbar.selectedItemId = R.id.nav_menu
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
frag = CalWeekFragment()
|
||||||
|
navbar.selectedItemId = R.id.nav_timetable
|
||||||
|
Vars.resetNav = false
|
||||||
|
}
|
||||||
|
|
||||||
|
supportFragmentManager.beginTransaction()
|
||||||
|
.replace(R.id.fragmentContainer, frag)
|
||||||
|
.commit()
|
||||||
|
|
||||||
|
navbar.setOnItemSelectedListener {
|
||||||
|
val ft = supportFragmentManager.beginTransaction()
|
||||||
|
|
||||||
|
when (it.itemId) {
|
||||||
|
R.id.nav_timetable -> {
|
||||||
|
ft.setCustomAnimations(
|
||||||
|
R.anim.slide_up,
|
||||||
|
R.anim.slide_down,
|
||||||
|
)
|
||||||
|
ft.replace(R.id.fragmentContainer, CalWeekFragment())
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.nav_marks -> {
|
||||||
|
ft.setCustomAnimations(
|
||||||
|
R.anim.slide_up,
|
||||||
|
R.anim.slide_down,
|
||||||
|
)
|
||||||
|
ft.replace(R.id.fragmentContainer, MarksFragment())
|
||||||
|
}
|
||||||
|
|
||||||
|
R.id.nav_menu -> {
|
||||||
|
ft.setCustomAnimations(
|
||||||
|
R.anim.slide_up,
|
||||||
|
R.anim.slide_down,
|
||||||
|
)
|
||||||
|
ft.replace(R.id.fragmentContainer, MenuFragment())
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> return@setOnItemSelectedListener false
|
||||||
|
}
|
||||||
|
|
||||||
|
ft.commit()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
setOnInternetAvailListener()
|
||||||
|
done = true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// @section SIGN_IN
|
// @section SIGN_IN
|
||||||
private fun onSignIn() {
|
override fun onSignIn(view: View, wantDelete: Boolean, dialog: Dialog?) {
|
||||||
val acc = Account(
|
val acc = Account(
|
||||||
findViewById<EditText>(R.id.usernameField).text.toString(),
|
view.findViewById<EditText>(R.id.usernameField).text.toString(),
|
||||||
findViewById<EditText>(R.id.passwordField).text.toString(),
|
view.findViewById<EditText>(R.id.passwordField).text.toString(),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
|
||||||
showSplashScreen()
|
var checked = false
|
||||||
|
lifecycleScope.launch {
|
||||||
|
val btn = view.findViewById<Button>(R.id.signInButton)
|
||||||
|
|
||||||
|
while (!checked) {
|
||||||
|
if (!checked) {
|
||||||
|
delay(300)
|
||||||
|
btn.text = "Přihlašování"
|
||||||
|
}
|
||||||
|
if (!checked) {
|
||||||
|
delay(300)
|
||||||
|
btn.text = "Přihlašování."
|
||||||
|
}
|
||||||
|
if (!checked) {
|
||||||
|
delay(300)
|
||||||
|
btn.text = "Přihlašování.."
|
||||||
|
}
|
||||||
|
if (!checked) {
|
||||||
|
delay(300)
|
||||||
|
btn.text = "Přihlašování..."
|
||||||
|
}
|
||||||
|
if (!checked) {
|
||||||
|
delay(300)
|
||||||
|
btn.text = "Přihlašování.."
|
||||||
|
}
|
||||||
|
if (!checked) {
|
||||||
|
delay(300)
|
||||||
|
btn.text = "Přihlašování."
|
||||||
|
}
|
||||||
|
if (!checked) {
|
||||||
|
delay(300)
|
||||||
|
btn.text = "Přihlašování"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
btn.text = "Přihlásit se"
|
||||||
|
}
|
||||||
|
|
||||||
Account.save(acc)
|
Account.save(acc)
|
||||||
|
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
val valid = Account.isValid(acc)
|
val valid = Account.isValid(acc)
|
||||||
|
|
||||||
|
checked = true
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if (!wantDelete) {
|
||||||
|
dialog?.dismiss()
|
||||||
|
}
|
||||||
launch()
|
launch()
|
||||||
} else {
|
} else {
|
||||||
showSignInScreen()
|
if (wantDelete) {
|
||||||
|
Util.deleteFile(Vars.accountDataFilePath)
|
||||||
|
}
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
applicationContext,
|
applicationContext,
|
||||||
"Neplatné přihlašovací údaje, zkuste to znovu",
|
"Neplatné přihlašovací údaje nebo nejste připojeni k internetu, zkuste to znovu.",
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setSignInButtonOnClick() {
|
|
||||||
findViewById<Button>(R.id.signInButton).setOnClickListener {
|
|
||||||
onSignIn()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setOnInternetAvailListener() {
|
private fun setOnInternetAvailListener() {
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -157,22 +299,22 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
// @section LAUNCH
|
// @section LAUNCH
|
||||||
private fun launch() {
|
private fun launch() {
|
||||||
// show the splash/loading screen
|
setContentView(R.layout.activity_container)
|
||||||
showSplashScreen()
|
|
||||||
|
|
||||||
// start
|
/* check if there is a saved user account
|
||||||
lifecycleScope.launch {
|
* if yes, use that
|
||||||
/* check if there is a saved user account
|
* otherwise show the login activity
|
||||||
* if yes, use that
|
*/
|
||||||
* otherwise show the login activity
|
|
||||||
*/
|
|
||||||
|
|
||||||
val accSaved: Boolean = Account.haveSaved()
|
val accSaved: Boolean = Account.haveSaved()
|
||||||
|
|
||||||
if (!accSaved) {
|
if (!accSaved) {
|
||||||
// show the sign in screen
|
// show the sign in screen
|
||||||
showSignInScreen()
|
showSignInScreen()
|
||||||
} else {
|
} else {
|
||||||
|
// show the splash/loading screen
|
||||||
|
showSplashScreen()
|
||||||
|
lifecycleScope.launch {
|
||||||
// launch!
|
// launch!
|
||||||
launchPhase1()
|
launchPhase1()
|
||||||
}
|
}
|
||||||
@@ -335,98 +477,39 @@ class MainActivity : AppCompatActivity() {
|
|||||||
Vars.dayMap[i] = day
|
Vars.dayMap[i] = day
|
||||||
}
|
}
|
||||||
|
|
||||||
setContentView(R.layout.activity_main)
|
// set the main content view
|
||||||
|
ft(R.id.app_root, MainFragment(), R.anim.slide_up, R.anim.slide_down)
|
||||||
toolbar = findViewById(R.id.toolbar)
|
|
||||||
|
|
||||||
if (
|
|
||||||
Util.fileToString(Vars.userDataFilePath) != "" &&
|
|
||||||
JSONObject(Util.fileToString(Vars.userDataFilePath)).has("fullName")
|
|
||||||
) {
|
|
||||||
toolbar.text =
|
|
||||||
JSONObject(Util.fileToString(Vars.userDataFilePath)).getString("fullName") +
|
|
||||||
role
|
|
||||||
} else {
|
|
||||||
toolbar.text = "Přihlašte se, prosím."
|
|
||||||
}
|
|
||||||
|
|
||||||
//window.statusBarColor = ContextCompat.getColor(applicationContext, R.color.primary)
|
|
||||||
|
|
||||||
|
|
||||||
navbar = findViewById(R.id.bottomNav)
|
|
||||||
|
|
||||||
var frag = supportFragmentManager.findFragmentById(R.id.fragmentContainer)
|
|
||||||
|
|
||||||
if (frag == null || frag is CalWeekFragment) {
|
|
||||||
frag = CalWeekFragment()
|
|
||||||
navbar.selectedItemId = R.id.nav_timetable
|
|
||||||
}
|
|
||||||
if (frag is MarksFragment) {
|
|
||||||
frag = MarksFragment()
|
|
||||||
navbar.selectedItemId = R.id.nav_marks
|
|
||||||
}
|
|
||||||
if (frag is MenuFragment) {
|
|
||||||
frag = MenuFragment()
|
|
||||||
navbar.selectedItemId = R.id.nav_menu
|
|
||||||
}
|
|
||||||
|
|
||||||
supportFragmentManager.beginTransaction()
|
|
||||||
.replace(R.id.fragmentContainer, frag)
|
|
||||||
.commit()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
navbar.setOnItemSelectedListener {
|
|
||||||
when (it.itemId) {
|
|
||||||
R.id.nav_timetable -> {
|
|
||||||
supportFragmentManager.beginTransaction()
|
|
||||||
.replace(R.id.fragmentContainer, CalWeekFragment())
|
|
||||||
.commit()
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
R.id.nav_marks -> {
|
|
||||||
supportFragmentManager.beginTransaction()
|
|
||||||
.replace(R.id.fragmentContainer, MarksFragment())
|
|
||||||
.commit()
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
R.id.nav_menu -> {
|
|
||||||
supportFragmentManager.beginTransaction()
|
|
||||||
.replace(R.id.fragmentContainer, MenuFragment())
|
|
||||||
.commit()
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setOnInternetAvailListener()
|
|
||||||
done = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// @section SPLASH_SCREENS
|
// @section SPLASH_SCREENS
|
||||||
private fun showSignInScreen() {
|
private fun showSignInScreen() {
|
||||||
setContentView(R.layout.activity_sign_in)
|
ft(R.id.app_root, SignInMainFragment(), R.anim.slide_up, R.anim.slide_down)
|
||||||
setSignInButtonOnClick()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showSplashScreen() {
|
private fun showSplashScreen() {
|
||||||
window.statusBarColor = ContextCompat.getColor(this, R.color.black)
|
ft(R.id.app_root, SplashFragment(), R.anim.slide_up, R.anim.slide_down)
|
||||||
|
}
|
||||||
|
|
||||||
lifecycleScope.launch {
|
// Fragment Transition
|
||||||
setContentView(R.layout.activity_splash_screen)
|
private fun ft(container: Int, frag: Fragment, animIn: Int, animOut: Int) {
|
||||||
|
val ft = supportFragmentManager.beginTransaction()
|
||||||
|
|
||||||
// Assuming you have an ImageView with ID "animatedImageView" in your layout
|
ft.setCustomAnimations(
|
||||||
val animatedImageView: ImageView = findViewById(R.id.loading_gif)
|
animIn,
|
||||||
Glide.with(applicationContext)
|
animOut
|
||||||
.load(R.drawable.loading)
|
)
|
||||||
.into(animatedImageView)
|
|
||||||
}
|
ft.replace(container, frag)
|
||||||
|
|
||||||
|
ft.commit()
|
||||||
|
}
|
||||||
|
|
||||||
|
// without animations
|
||||||
|
private fun ft(container: Int, frag: Fragment) {
|
||||||
|
val ft = supportFragmentManager.beginTransaction()
|
||||||
|
|
||||||
|
ft.replace(container, frag)
|
||||||
|
|
||||||
|
ft.commit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,24 @@
|
|||||||
package com.odweta.solen
|
package com.odweta.solen
|
||||||
|
|
||||||
class MainFragment {
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
|
||||||
|
class MainFragment : Fragment() {
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
return inflater.inflate(R.layout.activity_main, container, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
MainActivity.setListener(requireContext())
|
||||||
|
MainActivity.callSetupMain(view, savedInstanceState)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@ import android.view.Window
|
|||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
class MenuFragment : Fragment() {
|
class MenuFragment : Fragment() {
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
@@ -35,12 +36,16 @@ class MenuFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
signOut.setOnClickListener {
|
signOut.setOnClickListener {
|
||||||
val builder: AlertDialog.Builder = AlertDialog.Builder(context)
|
val builder: AlertDialog.Builder = AlertDialog.Builder(context, R.style.Theme_Solen_AlertDialog)
|
||||||
builder
|
builder
|
||||||
.setTitle("Opravdu se chcete odhlásit? Tato akce zavře aplikaci.")
|
.setView(LayoutInflater.from(context).inflate(R.layout.alert_dialog_sign_out, null))
|
||||||
.setPositiveButton("Ano") { dialog, _ ->
|
.setPositiveButton("Ano") { dialog, _ ->
|
||||||
MainActivity.quit(requireContext())
|
Util.deleteFile(Vars.userDataFilePath)
|
||||||
|
Util.deleteFile(Vars.timeTableFilePath)
|
||||||
|
Util.deleteFile(Vars.marksFilePath)
|
||||||
|
Util.deleteFile(Vars.accountDataFilePath)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
|
exitProcess(0)
|
||||||
}
|
}
|
||||||
.setNegativeButton("Ne") { dialog, _ ->
|
.setNegativeButton("Ne") { dialog, _ ->
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
|
|||||||
@@ -2,27 +2,84 @@ package com.odweta.solen
|
|||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.GestureDetector
|
||||||
|
import android.view.GestureDetector.SimpleOnGestureListener
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import android.widget.ScrollView
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlin.math.abs
|
||||||
|
|
||||||
class SettingsFragment : DialogFragment() {
|
class SettingsFragment : DialogFragment() {
|
||||||
|
private lateinit var scrollView: ScrollView
|
||||||
|
private var isScrollingToDismissEnabled = false
|
||||||
|
private var isScrollingToTop = true
|
||||||
|
private val gestureDetector: GestureDetector by lazy {
|
||||||
|
GestureDetector(requireContext(), SwipeGestureListener())
|
||||||
|
}
|
||||||
|
private val swipeThreshold = 100
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inner class SwipeGestureListener : SimpleOnGestureListener() {
|
||||||
|
override fun onDown(e: MotionEvent): Boolean {
|
||||||
|
// Reset the flag when the user touches the screen
|
||||||
|
isScrollingToDismissEnabled = false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFling(
|
||||||
|
e1: MotionEvent?,
|
||||||
|
e2: MotionEvent,
|
||||||
|
velocityX: Float,
|
||||||
|
velocityY: Float
|
||||||
|
): Boolean {
|
||||||
|
val diffY = e1?.let { e2.y - it.y } ?: 0f
|
||||||
|
if (diffY > swipeThreshold) {
|
||||||
|
// Swiped down
|
||||||
|
if (isScrollingToTop) {
|
||||||
|
// Enable dismissing only if scrolled to top
|
||||||
|
isScrollingToDismissEnabled = true
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View? {
|
): View? {
|
||||||
val view = inflater.inflate(R.layout.activity_settings, container, false)
|
val view = inflater.inflate(R.layout.activity_settings, container, false)
|
||||||
|
|
||||||
|
scrollView = view.findViewById(R.id.scrollViewSettings)
|
||||||
|
scrollView.scrollY = 0
|
||||||
|
|
||||||
|
scrollView.setOnTouchListener { _, event ->
|
||||||
|
gestureDetector.onTouchEvent(event)
|
||||||
|
// Return false to allow normal scrolling
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollView.viewTreeObserver.addOnScrollChangedListener {
|
||||||
|
isScrollingToTop = !scrollView.canScrollVertically(-1)
|
||||||
|
}
|
||||||
|
|
||||||
val button: Button = view.findViewById(R.id.setting_language_button_choice) // replace with your button ID
|
val button: Button = view.findViewById(R.id.setting_language_button_choice) // replace with your button ID
|
||||||
button.setOnClickListener {
|
button.setOnClickListener {
|
||||||
Dialogs.LanguageChange(requireContext()).show()
|
Dialogs.LanguageChange(requireContext()).show()
|
||||||
@@ -34,6 +91,7 @@ class SettingsFragment : DialogFragment() {
|
|||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val dialog = super.onCreateDialog(savedInstanceState)
|
val dialog = super.onCreateDialog(savedInstanceState)
|
||||||
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||||
|
dialog.window?.attributes?.windowAnimations = R.style.Theme_Solen_DialogAnimation
|
||||||
return dialog
|
return dialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,30 @@ package com.odweta.solen
|
|||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.GestureDetector
|
||||||
|
import android.view.Gravity
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
|
import android.view.WindowManager
|
||||||
|
import android.widget.Button
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import kotlin.math.abs
|
||||||
|
|
||||||
class SignInFragment : DialogFragment() {
|
class SignInFragment : DialogFragment() {
|
||||||
|
private lateinit var gestureDetector: GestureDetector
|
||||||
|
private var initialTouchY: Float = 0f
|
||||||
|
private val SWIPETHRESHOLD = 100
|
||||||
|
private val SWIPEVELOCITYTHRESHOLD = 100
|
||||||
|
private lateinit var dialog: Dialog
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
// Set up GestureDetector
|
||||||
|
gestureDetector = GestureDetector(requireContext(), SwipeGestureListener())
|
||||||
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,14 +34,74 @@ class SignInFragment : DialogFragment() {
|
|||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View? {
|
): View? {
|
||||||
return inflater.inflate(R.layout.activity_sign_in, container, false)
|
val view = inflater.inflate(R.layout.activity_sign_in, container, false)
|
||||||
|
MainActivity.setListener(requireContext())
|
||||||
|
|
||||||
|
view.setOnTouchListener { _, event ->
|
||||||
|
handleTouchEvent(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val dialog = super.onCreateDialog(savedInstanceState)
|
dialog = super.onCreateDialog(savedInstanceState)
|
||||||
|
dialog.window?.attributes?.windowAnimations = R.style.Theme_Solen_DialogAnimation
|
||||||
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||||
dialog.setCancelable(true)
|
dialog.setCancelable(true)
|
||||||
|
|
||||||
return dialog
|
return dialog
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
view.findViewById<Button>(R.id.signInButton).setOnClickListener {
|
||||||
|
Vars.resetNav = true
|
||||||
|
MainActivity.callOnSignIn(view, false, dialog)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class SwipeGestureListener : GestureDetector.SimpleOnGestureListener() {
|
||||||
|
override fun onDown(e: MotionEvent): Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
override fun onFling(
|
||||||
|
e1: MotionEvent?,
|
||||||
|
e2: MotionEvent,
|
||||||
|
velocityX: Float,
|
||||||
|
velocityY: Float
|
||||||
|
): Boolean {
|
||||||
|
val diffY = e1?.let { e2.y.minus(it.y) } ?: 0f
|
||||||
|
if (diffY > SWIPETHRESHOLD && abs(velocityY) > SWIPEVELOCITYTHRESHOLD) {
|
||||||
|
// Swiped down
|
||||||
|
dismiss()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleTouchEvent(event: MotionEvent): Boolean {
|
||||||
|
when (event.action) {
|
||||||
|
MotionEvent.ACTION_DOWN -> {
|
||||||
|
initialTouchY = event.rawY
|
||||||
|
}
|
||||||
|
MotionEvent.ACTION_MOVE -> {
|
||||||
|
val deltaY = event.rawY - initialTouchY
|
||||||
|
dialog?.window?.attributes?.y = deltaY.toInt()
|
||||||
|
dialog?.window?.attributes?.windowAnimations = 0
|
||||||
|
dialog?.show()
|
||||||
|
|
||||||
|
// Check if the dialog has been dragged beyond a threshold and dismiss if necessary
|
||||||
|
if (deltaY > 200) {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MotionEvent.ACTION_UP -> {
|
||||||
|
initialTouchY = 0f
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,29 +4,24 @@ import android.os.Bundle
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import android.widget.Button
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
class SignInMainFragment : Fragment() {
|
class SignInMainFragment : Fragment() {
|
||||||
private lateinit var img: ImageView
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View? {
|
): View? {
|
||||||
val view = inflater.inflate(R.layout.activity_splash_screen, container, false)
|
val view = inflater.inflate(R.layout.activity_sign_in, container, false)
|
||||||
img = view.findViewById(R.id.loading_gif)
|
MainActivity.setListener(requireContext())
|
||||||
|
|
||||||
|
view.findViewById<Button>(R.id.signInButton).setOnClickListener {
|
||||||
|
MainActivity.callOnSignIn(view, true, null)
|
||||||
|
}
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
|
||||||
super.onViewCreated(view, savedInstanceState)
|
|
||||||
|
|
||||||
// start the loading animation
|
|
||||||
Glide.with(requireContext())
|
|
||||||
.load(R.drawable.loading3)
|
|
||||||
.into(img)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,32 @@
|
|||||||
package com.odweta.solen
|
package com.odweta.solen
|
||||||
|
|
||||||
class SplashFragment {
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.ImageView
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
|
class SplashFragment : Fragment() {
|
||||||
|
private lateinit var img: ImageView
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
val view = inflater.inflate(R.layout.activity_splash_screen, container, false)
|
||||||
|
img = view.findViewById(R.id.loading_gif)
|
||||||
|
return view
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
// start the loading animation
|
||||||
|
Glide.with(requireContext())
|
||||||
|
.load(R.drawable.loading3)
|
||||||
|
.into(img)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -29,6 +29,8 @@ class Vars {
|
|||||||
|
|
||||||
val client = OkHttpClient()
|
val client = OkHttpClient()
|
||||||
|
|
||||||
|
var resetNav: Boolean = false
|
||||||
|
|
||||||
var isAPISetUp: Boolean = false
|
var isAPISetUp: Boolean = false
|
||||||
|
|
||||||
var selectedDay: Int = 0
|
var selectedDay: Int = 0
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<!-- fade_in.xml -->
|
||||||
|
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
</set>
|
android:fromAlpha="0.0"
|
||||||
|
android:toAlpha="1.0"
|
||||||
|
android:duration="200" />
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<!-- fade_in.xml -->
|
||||||
|
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
</set>
|
android:fromAlpha="1.0"
|
||||||
|
android:toAlpha="0.0"
|
||||||
|
android:duration="200" />
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
</set>
|
android:fromYDelta="0"
|
||||||
|
android:toYDelta="100%"
|
||||||
|
android:duration="300" />
|
||||||
|
</set>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
</set>
|
android:fromXDelta="100%p"
|
||||||
|
android:toXDelta="0"
|
||||||
|
android:duration="250" />
|
||||||
|
</set>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
</set>
|
android:fromXDelta="0"
|
||||||
|
android:toXDelta="-100%p"
|
||||||
|
android:duration="250" />
|
||||||
|
</set>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
</set>
|
android:fromYDelta="100%"
|
||||||
|
android:toYDelta="0%"
|
||||||
|
android:duration="600"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator" />
|
||||||
|
</set>
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
|
|
||||||
<corners android:radius="@dimen/corner_radius" />
|
<corners android:radius="@dimen/corner_radius" />
|
||||||
<solid android:color="@color/pastel_orange_transparent" />
|
<solid android:color="@color/black" />
|
||||||
<stroke android:width="5dp" android:color="@color/pastel_orange" />
|
<stroke android:width="5dp" android:color="@color/pastel_yellow" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
|
|
||||||
<corners android:radius="@dimen/corner_radius" />
|
<corners android:radius="@dimen/corner_radius" />
|
||||||
<solid android:color="@color/pastel_orange_transparent" />
|
<solid android:color="@color/pastel_yellow_transparent" />
|
||||||
<stroke android:width="5dp" android:color="@color/pastel_orange" />
|
<stroke android:width="5dp" android:color="@color/pastel_yellow" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -4,6 +4,6 @@
|
|||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
|
|
||||||
<corners android:radius="@dimen/corner_radius" />
|
<corners android:radius="@dimen/corner_radius" />
|
||||||
<solid android:color="@color/pastel_orange_transparent" />
|
<solid android:color="@color/transparent" />
|
||||||
<stroke android:width="5dp" android:color="@color/pastel_orange" />
|
<stroke android:width="10px" android:color="@color/pastel_yellow" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -5,46 +5,61 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/link"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.0"
|
|
||||||
app:srcCompat="@drawable/solen" />
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appBarLayout"
|
android:id="@+id/appBarLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/roboto_src"
|
android:background="@color/black">
|
||||||
android:theme="@style/Theme.Solen.AppBarOverlay">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<TextView
|
||||||
android:id="@+id/settingsToolbar"
|
android:id="@+id/toolbar"
|
||||||
|
android:fontFamily="@font/roboto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorPrimary"
|
android:layout_marginHorizontal="20dp"
|
||||||
android:theme="@style/Theme.Solen.AppBarOverlay"
|
android:layout_marginTop="20dp"
|
||||||
app:popupTheme="@style/Theme.Solen.PopupOverlay"
|
android:text="@string/about_app"
|
||||||
app:title="@string/about_app">
|
android:background="@drawable/toolbar_background"
|
||||||
|
android:gravity="center"
|
||||||
</androidx.appcompat.widget.Toolbar>
|
android:padding="10dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="25dp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView2"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="300dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/podstata"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
|
||||||
|
app:srcCompat="@drawable/solon_500_yellow" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/podstata"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:fontFamily="monospace"
|
||||||
|
android:text="Přehlednost je podstata."
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textView"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
android:layout_width="299dp"
|
android:layout_width="299dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginBottom="300dp"
|
android:layout_marginBottom="250dp"
|
||||||
android:text="Vylepšená verze mobilní aplikace ŠkolaOnLine"
|
android:text="Vylepšená verze mobilní aplikace ŠkolaOnLine"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
@@ -54,23 +69,7 @@
|
|||||||
app:layout_constraintHorizontal_bias="0.416"
|
app:layout_constraintHorizontal_bias="0.416"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView2"
|
app:layout_constraintTop_toBottomOf="@+id/imageView2"
|
||||||
app:layout_constraintVertical_bias="0.658" />
|
app:layout_constraintVertical_bias="1.0" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="144dp"
|
|
||||||
android:layout_marginTop="70dp"
|
|
||||||
android:layout_marginEnd="1dp"
|
|
||||||
android:text="Vývoj:"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="20sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/link"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
|
||||||
app:layout_constraintVertical_bias="0.106" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/link"
|
android:id="@+id/link"
|
||||||
@@ -78,7 +77,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="1dp"
|
android:layout_marginStart="1dp"
|
||||||
android:layout_marginTop="70dp"
|
|
||||||
android:layout_marginEnd="139dp"
|
android:layout_marginEnd="139dp"
|
||||||
android:text=" Odweta"
|
android:text=" Odweta"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
@@ -89,7 +87,22 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/textView3"
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||||
app:layout_constraintVertical_bias="0.106" />
|
app:layout_constraintVertical_bias="0.3" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="144dp"
|
||||||
|
android:layout_marginEnd="1dp"
|
||||||
|
android:text="Vývoj:"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/link"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||||
|
app:layout_constraintVertical_bias="0.3" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView7"
|
android:id="@+id/imageView7"
|
||||||
@@ -100,8 +113,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.303"
|
app:layout_constraintHorizontal_bias="0.303"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/link"
|
app:layout_constraintVertical_bias="0.54"
|
||||||
app:layout_constraintVertical_bias="1.0"
|
|
||||||
app:srcCompat="@mipmap/gitlab_logo_foreground" />
|
app:srcCompat="@mipmap/gitlab_logo_foreground" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -109,31 +121,13 @@
|
|||||||
style="@style/LinkText"
|
style="@style/LinkText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="59dp"
|
|
||||||
android:layout_marginEnd="96dp"
|
android:layout_marginEnd="96dp"
|
||||||
android:layout_marginBottom="102dp"
|
android:layout_marginBottom="100dp"
|
||||||
android:text="Zdrojový kód"
|
android:text="Zdrojový kód"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView7"
|
app:layout_constraintStart_toEndOf="@+id/imageView7" />
|
||||||
app:layout_constraintTop_toBottomOf="@+id/link"
|
|
||||||
app:layout_constraintVertical_bias="1.0" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView4"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="40dp"
|
|
||||||
android:fontFamily="monospace"
|
|
||||||
android:text="Přehlednost je podstata."
|
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="italic"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/textView"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/app_root">
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
@@ -17,10 +17,11 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/button_background"
|
android:layout_marginHorizontal="20dp"
|
||||||
android:gravity="center"
|
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginHorizontal="5dp"
|
android:background="@drawable/toolbar_background"
|
||||||
|
android:gravity="center"
|
||||||
|
android:fontFamily="@font/roboto"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="25dp" />
|
android:textSize="25dp" />
|
||||||
@@ -42,8 +43,15 @@
|
|||||||
android:id="@+id/bottomNav"
|
android:id="@+id/bottomNav"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/toolbar_background"
|
||||||
|
android:layout_marginHorizontal="20dp"
|
||||||
|
android:layout_marginVertical="20dp"
|
||||||
|
android:fontFamily="@font/roboto"
|
||||||
|
app:itemTextColor="@color/white"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/fragmentContainer"
|
app:layout_constraintTop_toBottomOf="@+id/fragmentContainer"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:menu="@menu/menu_navbar" />
|
app:menu="@menu/menu_navbar" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -10,25 +10,26 @@
|
|||||||
android:id="@+id/appBarLayout"
|
android:id="@+id/appBarLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/roboto_src"
|
android:background="@color/black">
|
||||||
android:theme="@style/Theme.Solen.AppBarOverlay">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<TextView
|
||||||
android:id="@+id/settingsToolbar"
|
android:id="@+id/toolbar"
|
||||||
|
android:fontFamily="@font/roboto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorPrimary"
|
android:layout_marginHorizontal="20dp"
|
||||||
android:theme="@style/Theme.Solen.AppBarOverlay"
|
android:layout_marginTop="20dp"
|
||||||
app:popupTheme="@style/Theme.Solen.PopupOverlay"
|
android:text="@string/settings"
|
||||||
app:title="@string/settings">
|
android:background="@drawable/toolbar_background"
|
||||||
|
android:gravity="center"
|
||||||
</androidx.appcompat.widget.Toolbar>
|
android:padding="10dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="25dp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scrollView2"
|
android:id="@+id/scrollViewSettings"
|
||||||
android:layout_width="409dp"
|
android:layout_width="409dp"
|
||||||
android:layout_height="673dp"
|
android:layout_height="673dp"
|
||||||
android:layout_marginStart="1dp"
|
android:layout_marginStart="1dp"
|
||||||
@@ -41,41 +42,41 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
|
app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/scrollViewLinear"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/setting_language"
|
android:id="@+id/setting_language"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="20dp"
|
android:paddingLeft="20dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingRight="20dp"
|
android:paddingRight="20dp"
|
||||||
android:paddingBottom="10dp">
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settings_language_text"
|
android:id="@+id/settings_language_text"
|
||||||
android:layout_width="180dp"
|
android:layout_width="180dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/lang_change"
|
android:text="@string/lang_change"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textColorHighlight="#FFFFFF"
|
android:textColorHighlight="#FFFFFF"
|
||||||
android:textColorHint="#FFFFFF"
|
android:textColorHint="#FFFFFF"
|
||||||
android:textColorLink="#FFFFFF"
|
android:textColorLink="#FFFFFF"
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/setting_language_button_choice"
|
android:id="@+id/setting_language_button_choice"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/lang_choose"
|
android:background="@drawable/button_background"
|
||||||
android:background="@drawable/button_background" />
|
android:text="@string/lang_choose" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.528"
|
app:layout_constraintVertical_bias="0.528"
|
||||||
app:srcCompat="@drawable/solen" />
|
app:srcCompat="@drawable/solon_500_yellow" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/usernameField"
|
android:id="@+id/usernameField"
|
||||||
android:layout_width="240dp"
|
android:layout_width="240dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="292dp"
|
android:layout_marginTop="292dp"
|
||||||
android:background="@color/primary"
|
android:background="@drawable/button_background"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:hint="Uživatelské jméno"
|
android:hint="Uživatelské jméno"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
android:layout_width="240dp"
|
android:layout_width="240dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginBottom="224dp"
|
android:layout_marginBottom="224dp"
|
||||||
android:background="@color/primary"
|
android:background="@drawable/button_background"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:hint="Heslo"
|
android:hint="Heslo"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
@@ -60,15 +60,16 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/signInButton"
|
android:id="@+id/signInButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="240dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_marginStart="137dp"
|
android:layout_marginStart="137dp"
|
||||||
android:layout_marginTop="72dp"
|
android:layout_marginTop="72dp"
|
||||||
android:layout_marginEnd="137dp"
|
android:layout_marginEnd="137dp"
|
||||||
android:layout_marginBottom="88dp"
|
android:layout_marginBottom="88dp"
|
||||||
android:text="Přihlásit se"
|
android:text="Přihlásit se"
|
||||||
|
android:fontFamily="@font/roboto"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:cornerRadius="@dimen/corner_radius"
|
android:background="@drawable/button_background"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|||||||
@@ -3,20 +3,8 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/splash_root">
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView4"
|
|
||||||
android:layout_width="700dp"
|
|
||||||
android:layout_height="900dp"
|
|
||||||
android:contentDescription="@string/background"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.501"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.562"
|
|
||||||
app:srcCompat="@color/black" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView3"
|
android:id="@+id/imageView3"
|
||||||
@@ -31,13 +19,13 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.16"
|
app:layout_constraintVertical_bias="0.16"
|
||||||
app:srcCompat="@drawable/solen" />
|
app:srcCompat="@drawable/solon_500_yellow" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/loading_gif"
|
android:id="@+id/loading_gif"
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
android:src="@drawable/loading"
|
android:src="@drawable/loading3"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.497"
|
app:layout_constraintHorizontal_bias="0.497"
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<TextView
|
||||||
|
android:id="@+id/heading"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/sign_out_warning"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:windowBackground="@drawable/button_background"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:gravity="start" />
|
||||||
|
</LinearLayout>
|
||||||
@@ -1,24 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/settings_language_choice"
|
android:id="@+id/settings_language_choice"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1" >
|
android:layout_weight="1"
|
||||||
|
android:padding="20dp">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/radio_button_language_cz"
|
android:id="@+id/radio_button_language_cz"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/lang_cz" />
|
android:text="@string/lang_cz"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginHorizontal="20dp"
|
||||||
|
android:theme="@style/Theme.Solen.RadioButton" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/radio_button_language_en"
|
android:id="@+id/radio_button_language_en"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/lang_en" />
|
android:text="@string/lang_en"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginHorizontal="20dp"
|
||||||
|
android:theme="@style/Theme.Solen.RadioButton" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
@@ -1,13 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="old_primary">#FFED7D31</color>
|
<color name="older_primary">#FFED7D31</color>
|
||||||
<color name="primary">#FFFF9933</color>
|
<color name="old_primary">#FFFF9933</color>
|
||||||
|
<color name="primary">#FFFFCC33</color>
|
||||||
<color name="secondary">#FF000000</color>
|
<color name="secondary">#FF000000</color>
|
||||||
|
|
||||||
<color name="black">#FF000000</color>
|
<color name="black">#FF000000</color>
|
||||||
<color name="white">#FFFFFFFF</color>
|
<color name="white">#FFFFFFFF</color>
|
||||||
<color name="red">#FFFF0000</color>
|
<color name="red">#FFFF0000</color>
|
||||||
<color name="gray_69">#FF696969</color>
|
<color name="gray_69">#FF696969</color>
|
||||||
|
<color name="transparent">#00000000</color>
|
||||||
|
|
||||||
<color name="pastel_red">#FFFF6666</color>
|
<color name="pastel_red">#FFFF6666</color>
|
||||||
<color name="pastel_green">#FF00CC99</color>
|
<color name="pastel_green">#FF00CC99</color>
|
||||||
@@ -32,5 +34,6 @@
|
|||||||
<color name="cal_week_free">#FF00CC99</color>
|
<color name="cal_week_free">#FF00CC99</color>
|
||||||
<color name="cal_week_free_transparent_bg">#5000CC99</color>
|
<color name="cal_week_free_transparent_bg">#5000CC99</color>
|
||||||
|
|
||||||
<color name="primary_transparent_bg">#50ED7D31</color>
|
<color name="old_primary_transparent_bg">#50ED7D31</color>
|
||||||
|
<color name="primary_transparent_bg">#50FFCC33</color>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -16,4 +16,5 @@
|
|||||||
<string name="lang_choose">Vybrat</string>
|
<string name="lang_choose">Vybrat</string>
|
||||||
<string name="splash_screen">splash screen</string>
|
<string name="splash_screen">splash screen</string>
|
||||||
<string name="about_app">O aplikaci</string>
|
<string name="about_app">O aplikaci</string>
|
||||||
|
<string name="sign_out_warning">Opravdu se chcete odhlásit? Tato akce zavře aplikaci.</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -75,4 +75,21 @@
|
|||||||
<item name="android:strokeWidth">5</item>
|
<item name="android:strokeWidth">5</item>
|
||||||
<item name="cornerRadius">@dimen/corner_radius</item>
|
<item name="cornerRadius">@dimen/corner_radius</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Solen.RadioButton">
|
||||||
|
<item name="colorControlActivated">@color/primary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Solen.AlertDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||||
|
<item name="android:windowBackground">@drawable/alert_dialog_background</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Solen.DialogAnimation">
|
||||||
|
<item name="android:windowEnterAnimation">@anim/slide_up</item>
|
||||||
|
<item name="android:windowExitAnimation">@anim/slide_down</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Solen.Scrollbar">
|
||||||
|
<item name="color">@color/primary</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||