phase 2 i forgor
@@ -10,7 +10,9 @@ import android.text.SpannableString
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.text.style.ClickableSpan
|
||||
import android.text.style.UnderlineSpan
|
||||
import android.view.GestureDetector
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
@@ -18,9 +20,15 @@ import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import kotlin.math.abs
|
||||
|
||||
|
||||
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?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
||||
@@ -32,6 +40,14 @@ class AboutFragment : DialogFragment() {
|
||||
): View? {
|
||||
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 underlinedText = SpannableString(link.text)
|
||||
underlinedText.setSpan(UnderlineSpan(), 1, link.text.length, 0)
|
||||
@@ -52,6 +68,7 @@ class AboutFragment : DialogFragment() {
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val dialog = super.onCreateDialog(savedInstanceState)
|
||||
dialog.window?.attributes?.windowAnimations = R.style.Theme_Solen_DialogAnimation
|
||||
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||
dialog.setCancelable(true)
|
||||
|
||||
@@ -80,4 +97,48 @@ class AboutFragment : DialogFragment() {
|
||||
link.text = spannable
|
||||
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.drawable.GradientDrawable
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.Log
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -21,8 +24,17 @@ import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
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.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() {
|
||||
override fun onCreateView(
|
||||
@@ -33,10 +45,11 @@ class CalWeekFragment : Fragment() {
|
||||
val view = inflater.inflate(R.layout.activity_cal_week, container, false)
|
||||
|
||||
val viewPager: ViewPager2 = view.findViewById(R.id.dayPager)
|
||||
|
||||
val adapter = DayPagerAdapter(childFragmentManager, viewLifecycleOwner.lifecycle)
|
||||
|
||||
for (i in 0 until Vars.days.size) {
|
||||
adapter.addFragment(DayFragment(i))
|
||||
adapter.addFragment(DayFragment(i, view))
|
||||
}
|
||||
|
||||
viewPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
||||
@@ -47,8 +60,11 @@ class CalWeekFragment : Fragment() {
|
||||
})
|
||||
|
||||
viewPager.adapter = adapter
|
||||
viewPager.offscreenPageLimit = adapter.itemCount
|
||||
viewPager.currentItem = Vars.selectedDay
|
||||
|
||||
view.tag = "timetable_root"
|
||||
|
||||
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")
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
@@ -79,25 +97,165 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
val view = inflater.inflate(R.layout.fragment_day, container, false)
|
||||
view.tag = "day_${position}_root"
|
||||
|
||||
val dayLayout: LinearLayout = view.findViewById(R.id.layoutDayMain)
|
||||
dayLayout.tag = "day_${position}_layout"
|
||||
Vars.dayMap[position]?.let { createDayView(it, dayLayout, resources) }
|
||||
|
||||
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) {
|
||||
val customFont = context?.let { ResourcesCompat.getFont(it, R.font.roboto) }
|
||||
|
||||
val scrollView = ScrollView(requireContext())
|
||||
scrollView.scrollBarStyle = R.style.Theme_Solen_Scrollbar
|
||||
|
||||
val dayLayout = LinearLayout(requireContext())
|
||||
dayLayout.orientation = LinearLayout.VERTICAL
|
||||
|
||||
val nameDateTextView = TextView(requireContext())
|
||||
val nameDateString = day.name + " " + day.date
|
||||
nameDateTextView.typeface = customFont
|
||||
nameDateTextView.text = nameDateString
|
||||
nameDateTextView.textSize = 30f
|
||||
nameDateTextView.text = "${day.name} ${day.date}"
|
||||
nameDateTextView.setTypeface(customFont, Typeface.BOLD_ITALIC)
|
||||
nameDateTextView.textSize = 27f
|
||||
nameDateTextView.setTextColor(
|
||||
ContextCompat.getColor(
|
||||
requireContext(),
|
||||
@@ -170,18 +328,17 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
||||
subjectBackground
|
||||
)
|
||||
)
|
||||
subjectDrawable.setStroke(
|
||||
10,
|
||||
ContextCompat.getColor(
|
||||
requireContext(),
|
||||
subjectStroke
|
||||
)
|
||||
)
|
||||
|
||||
// launch a periodic check for highlighting the current lecture
|
||||
highlightCurrent(subj, day, subjectDrawable, subjectStroke, i)
|
||||
|
||||
|
||||
val subjectLayout = LinearLayout(requireContext())
|
||||
subjectLayout.orientation = LinearLayout.HORIZONTAL
|
||||
subjectLayout.gravity = Gravity.CENTER_VERTICAL
|
||||
subjectLayout.background = subjectDrawable
|
||||
// set the tag for later use (used as an id)
|
||||
subjectLayout.tag = subj.number
|
||||
|
||||
val subjectNumberDrawable = GradientDrawable()
|
||||
subjectNumberDrawable.shape = GradientDrawable.RECTANGLE
|
||||
@@ -192,13 +349,13 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
||||
subjectBackground
|
||||
)
|
||||
)
|
||||
subjectNumberDrawable.setStroke(
|
||||
/*subjectNumberDrawable.setStroke(
|
||||
10,
|
||||
ContextCompat.getColor(
|
||||
requireContext(),
|
||||
subjectStroke
|
||||
)
|
||||
)
|
||||
)*/
|
||||
|
||||
val subjectNumberTextView = TextView(requireContext())
|
||||
subjectNumberTextView.typeface = customFont
|
||||
@@ -309,7 +466,7 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
||||
val subjectTeacherTextView = TextView(requireContext())
|
||||
subjectTeacherTextView.text = subj.teacher
|
||||
subjectTeacherTextView.typeface = customFont
|
||||
subjectTeacherTextView.textSize = 15f
|
||||
subjectTeacherTextView.textSize = 12f
|
||||
subjectTeacherTextView.setPadding(10, 0, 20, 10)
|
||||
subjectTeacherTextView.textAlignment = View.TEXT_ALIGNMENT_TEXT_END
|
||||
subjectTeacherTextView.setTextColor(
|
||||
@@ -395,7 +552,7 @@ class DayFragment(private val position: Int) : Fragment(R.layout.fragment_day) {
|
||||
dayLayout.addView(subjectSeparator)
|
||||
} else if (i != 0) {
|
||||
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(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
Util.pixelsToDp(20, resources)
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
package com.odweta.solen
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.EditText
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.transition.AutoTransition
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.bumptech.glide.Glide
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
@@ -20,19 +26,39 @@ import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
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 toastShowing: Boolean = false
|
||||
private var toastShown: Boolean = false
|
||||
private var toast2Shown: Boolean = false
|
||||
private var done: Boolean = false
|
||||
private lateinit var toolbar: TextView
|
||||
private var role: String = " - Student"
|
||||
private lateinit var navbar: BottomNavigationView
|
||||
|
||||
private lateinit var toolbar: TextView
|
||||
|
||||
// @section COMPANION
|
||||
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) {
|
||||
// Create an Intent to launch the home screen
|
||||
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
|
||||
private fun onSignIn() {
|
||||
override fun onSignIn(view: View, wantDelete: Boolean, dialog: Dialog?) {
|
||||
val acc = Account(
|
||||
findViewById<EditText>(R.id.usernameField).text.toString(),
|
||||
findViewById<EditText>(R.id.passwordField).text.toString(),
|
||||
view.findViewById<EditText>(R.id.usernameField).text.toString(),
|
||||
view.findViewById<EditText>(R.id.passwordField).text.toString(),
|
||||
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)
|
||||
|
||||
lifecycleScope.launch {
|
||||
val valid = Account.isValid(acc)
|
||||
|
||||
checked = true
|
||||
|
||||
if (valid) {
|
||||
if (!wantDelete) {
|
||||
dialog?.dismiss()
|
||||
}
|
||||
launch()
|
||||
} else {
|
||||
showSignInScreen()
|
||||
if (wantDelete) {
|
||||
Util.deleteFile(Vars.accountDataFilePath)
|
||||
}
|
||||
Toast.makeText(
|
||||
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
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setSignInButtonOnClick() {
|
||||
findViewById<Button>(R.id.signInButton).setOnClickListener {
|
||||
onSignIn()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setOnInternetAvailListener() {
|
||||
lifecycleScope.launch {
|
||||
while (true) {
|
||||
@@ -157,22 +299,22 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
// @section LAUNCH
|
||||
private fun launch() {
|
||||
// show the splash/loading screen
|
||||
showSplashScreen()
|
||||
setContentView(R.layout.activity_container)
|
||||
|
||||
// start
|
||||
lifecycleScope.launch {
|
||||
/* check if there is a saved user account
|
||||
* if yes, use that
|
||||
* otherwise show the login activity
|
||||
*/
|
||||
/* check if there is a saved user account
|
||||
* if yes, use that
|
||||
* otherwise show the login activity
|
||||
*/
|
||||
|
||||
val accSaved: Boolean = Account.haveSaved()
|
||||
val accSaved: Boolean = Account.haveSaved()
|
||||
|
||||
if (!accSaved) {
|
||||
// show the sign in screen
|
||||
showSignInScreen()
|
||||
} else {
|
||||
if (!accSaved) {
|
||||
// show the sign in screen
|
||||
showSignInScreen()
|
||||
} else {
|
||||
// show the splash/loading screen
|
||||
showSplashScreen()
|
||||
lifecycleScope.launch {
|
||||
// launch!
|
||||
launchPhase1()
|
||||
}
|
||||
@@ -335,98 +477,39 @@ class MainActivity : AppCompatActivity() {
|
||||
Vars.dayMap[i] = day
|
||||
}
|
||||
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
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
|
||||
// set the main content view
|
||||
ft(R.id.app_root, MainFragment(), R.anim.slide_up, R.anim.slide_down)
|
||||
}
|
||||
|
||||
|
||||
// @section SPLASH_SCREENS
|
||||
private fun showSignInScreen() {
|
||||
setContentView(R.layout.activity_sign_in)
|
||||
setSignInButtonOnClick()
|
||||
ft(R.id.app_root, SignInMainFragment(), R.anim.slide_up, R.anim.slide_down)
|
||||
}
|
||||
|
||||
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 {
|
||||
setContentView(R.layout.activity_splash_screen)
|
||||
// Fragment Transition
|
||||
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
|
||||
val animatedImageView: ImageView = findViewById(R.id.loading_gif)
|
||||
Glide.with(applicationContext)
|
||||
.load(R.drawable.loading)
|
||||
.into(animatedImageView)
|
||||
}
|
||||
ft.setCustomAnimations(
|
||||
animIn,
|
||||
animOut
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
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.ImageView
|
||||
import androidx.fragment.app.Fragment
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class MenuFragment : Fragment() {
|
||||
override fun onCreateView(
|
||||
@@ -35,12 +36,16 @@ class MenuFragment : Fragment() {
|
||||
}
|
||||
|
||||
signOut.setOnClickListener {
|
||||
val builder: AlertDialog.Builder = AlertDialog.Builder(context)
|
||||
val builder: AlertDialog.Builder = AlertDialog.Builder(context, R.style.Theme_Solen_AlertDialog)
|
||||
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, _ ->
|
||||
MainActivity.quit(requireContext())
|
||||
Util.deleteFile(Vars.userDataFilePath)
|
||||
Util.deleteFile(Vars.timeTableFilePath)
|
||||
Util.deleteFile(Vars.marksFilePath)
|
||||
Util.deleteFile(Vars.accountDataFilePath)
|
||||
dialog.dismiss()
|
||||
exitProcess(0)
|
||||
}
|
||||
.setNegativeButton("Ne") { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
|
||||
@@ -2,27 +2,84 @@ package com.odweta.solen
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.GestureDetector
|
||||
import android.view.GestureDetector.SimpleOnGestureListener
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import android.widget.Button
|
||||
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() {
|
||||
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?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
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(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
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
|
||||
button.setOnClickListener {
|
||||
Dialogs.LanguageChange(requireContext()).show()
|
||||
@@ -34,6 +91,7 @@ class SettingsFragment : DialogFragment() {
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val dialog = super.onCreateDialog(savedInstanceState)
|
||||
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||
dialog.window?.attributes?.windowAnimations = R.style.Theme_Solen_DialogAnimation
|
||||
return dialog
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,16 +3,30 @@ package com.odweta.solen
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
import android.os.Bundle
|
||||
import android.view.GestureDetector
|
||||
import android.view.Gravity
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import android.widget.Button
|
||||
import androidx.core.content.ContextCompat
|
||||
import kotlin.math.abs
|
||||
|
||||
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?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
// Set up GestureDetector
|
||||
gestureDetector = GestureDetector(requireContext(), SwipeGestureListener())
|
||||
setStyle(STYLE_NORMAL, R.style.Theme_Solen)
|
||||
}
|
||||
|
||||
@@ -20,14 +34,74 @@ class SignInFragment : DialogFragment() {
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): 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 {
|
||||
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.setCancelable(true)
|
||||
|
||||
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.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.ImageView
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.bumptech.glide.Glide
|
||||
|
||||
class SignInMainFragment : 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)
|
||||
val view = inflater.inflate(R.layout.activity_sign_in, container, false)
|
||||
MainActivity.setListener(requireContext())
|
||||
|
||||
view.findViewById<Button>(R.id.signInButton).setOnClickListener {
|
||||
MainActivity.callOnSignIn(view, true, null)
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
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()
|
||||
|
||||
var resetNav: Boolean = false
|
||||
|
||||
var isAPISetUp: Boolean = false
|
||||
|
||||
var selectedDay: Int = 0
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</set>
|
||||
<!-- fade_in.xml -->
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
android:duration="200" />
|
||||
@@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</set>
|
||||
<!-- fade_in.xml -->
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
android:duration="200" />
|
||||
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</set>
|
||||
<translate
|
||||
android:fromYDelta="0"
|
||||
android:toYDelta="100%"
|
||||
android:duration="300" />
|
||||
</set>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</set>
|
||||
<translate
|
||||
android:fromXDelta="100%p"
|
||||
android:toXDelta="0"
|
||||
android:duration="250" />
|
||||
</set>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</set>
|
||||
<translate
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-100%p"
|
||||
android:duration="250" />
|
||||
</set>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</set>
|
||||
<translate
|
||||
android:fromYDelta="100%"
|
||||
android:toYDelta="0%"
|
||||
android:duration="600"
|
||||
android:interpolator="@android:anim/accelerate_interpolator" />
|
||||
</set>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/corner_radius" />
|
||||
<solid android:color="@color/pastel_orange_transparent" />
|
||||
<stroke android:width="5dp" android:color="@color/pastel_orange" />
|
||||
<solid android:color="@color/black" />
|
||||
<stroke android:width="5dp" android:color="@color/pastel_yellow" />
|
||||
</shape>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/corner_radius" />
|
||||
<solid android:color="@color/pastel_orange_transparent" />
|
||||
<stroke android:width="5dp" android:color="@color/pastel_orange" />
|
||||
<solid android:color="@color/pastel_yellow_transparent" />
|
||||
<stroke android:width="5dp" android:color="@color/pastel_yellow" />
|
||||
</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">
|
||||
|
||||
<corners android:radius="@dimen/corner_radius" />
|
||||
<solid android:color="@color/pastel_orange_transparent" />
|
||||
<stroke android:width="5dp" android:color="@color/pastel_orange" />
|
||||
<solid android:color="@color/transparent" />
|
||||
<stroke android:width="10px" android:color="@color/pastel_yellow" />
|
||||
</shape>
|
||||
|
||||
@@ -5,46 +5,61 @@
|
||||
android:layout_width="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
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto_src"
|
||||
android:theme="@style/Theme.Solen.AppBarOverlay">
|
||||
android:background="@color/black">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/settingsToolbar"
|
||||
<TextView
|
||||
android:id="@+id/toolbar"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/Theme.Solen.AppBarOverlay"
|
||||
app:popupTheme="@style/Theme.Solen.PopupOverlay"
|
||||
app:title="@string/about_app">
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/about_app"
|
||||
android:background="@drawable/toolbar_background"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="25dp" />
|
||||
|
||||
</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
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="299dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginBottom="300dp"
|
||||
android:layout_marginBottom="250dp"
|
||||
android:text="Vylepšená verze mobilní aplikace ŠkolaOnLine"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
@@ -54,23 +69,7 @@
|
||||
app:layout_constraintHorizontal_bias="0.416"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView2"
|
||||
app:layout_constraintVertical_bias="0.658" />
|
||||
|
||||
<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" />
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/link"
|
||||
@@ -78,7 +77,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:layout_marginEnd="139dp"
|
||||
android:text=" Odweta"
|
||||
android:textColor="#FFFFFF"
|
||||
@@ -89,7 +87,22 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||
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
|
||||
android:id="@+id/imageView7"
|
||||
@@ -100,8 +113,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.303"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/link"
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintVertical_bias="0.54"
|
||||
app:srcCompat="@mipmap/gitlab_logo_foreground" />
|
||||
|
||||
<TextView
|
||||
@@ -109,31 +121,13 @@
|
||||
style="@style/LinkText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="59dp"
|
||||
android:layout_marginEnd="96dp"
|
||||
android:layout_marginBottom="102dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
android:text="Zdrojový kód"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
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" />
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView7" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/app_root">
|
||||
|
||||
</FrameLayout>
|
||||
@@ -17,10 +17,11 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/button_background"
|
||||
android:gravity="center"
|
||||
android:layout_marginHorizontal="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:textColor="@color/white"
|
||||
android:textSize="25dp" />
|
||||
@@ -42,8 +43,15 @@
|
||||
android:id="@+id/bottomNav"
|
||||
android:layout_width="match_parent"
|
||||
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_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:menu="@menu/menu_navbar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -10,25 +10,26 @@
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto_src"
|
||||
android:theme="@style/Theme.Solen.AppBarOverlay">
|
||||
android:background="@color/black">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/settingsToolbar"
|
||||
<TextView
|
||||
android:id="@+id/toolbar"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/Theme.Solen.AppBarOverlay"
|
||||
app:popupTheme="@style/Theme.Solen.PopupOverlay"
|
||||
app:title="@string/settings">
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/settings"
|
||||
android:background="@drawable/toolbar_background"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="25dp" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView2"
|
||||
android:id="@+id/scrollViewSettings"
|
||||
android:layout_width="409dp"
|
||||
android:layout_height="673dp"
|
||||
android:layout_marginStart="1dp"
|
||||
@@ -41,41 +42,41 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/scrollViewLinear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setting_language"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp">
|
||||
android:id="@+id/setting_language"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_language_text"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lang_change"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColorHighlight="#FFFFFF"
|
||||
android:textColorHint="#FFFFFF"
|
||||
android:textColorLink="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
<TextView
|
||||
android:id="@+id/settings_language_text"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lang_change"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColorHighlight="#FFFFFF"
|
||||
android:textColorHint="#FFFFFF"
|
||||
android:textColorLink="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/setting_language_button_choice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lang_choose"
|
||||
android:background="@drawable/button_background" />
|
||||
<Button
|
||||
android:id="@+id/setting_language_button_choice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_background"
|
||||
android:text="@string/lang_choose" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.528"
|
||||
app:srcCompat="@drawable/solen" />
|
||||
app:srcCompat="@drawable/solon_500_yellow" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/usernameField"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="292dp"
|
||||
android:background="@color/primary"
|
||||
android:background="@drawable/button_background"
|
||||
android:ems="10"
|
||||
android:hint="Uživatelské jméno"
|
||||
android:inputType="text"
|
||||
@@ -44,7 +44,7 @@
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginBottom="224dp"
|
||||
android:background="@color/primary"
|
||||
android:background="@drawable/button_background"
|
||||
android:ems="10"
|
||||
android:hint="Heslo"
|
||||
android:inputType="textPassword"
|
||||
@@ -60,15 +60,16 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/signInButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="137dp"
|
||||
android:layout_marginTop="72dp"
|
||||
android:layout_marginEnd="137dp"
|
||||
android:layout_marginBottom="88dp"
|
||||
android:text="Přihlásit se"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:textSize="20sp"
|
||||
app:cornerRadius="@dimen/corner_radius"
|
||||
android:background="@drawable/button_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -3,20 +3,8 @@
|
||||
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">
|
||||
|
||||
<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" />
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/splash_root">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
@@ -31,13 +19,13 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.16"
|
||||
app:srcCompat="@drawable/solen" />
|
||||
app:srcCompat="@drawable/solon_500_yellow" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/loading_gif"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:src="@drawable/loading"
|
||||
android:src="@drawable/loading3"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
<?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_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"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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
|
||||
android:id="@+id/settings_language_choice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" >
|
||||
android:layout_weight="1"
|
||||
android:padding="20dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_button_language_cz"
|
||||
android:layout_width="match_parent"
|
||||
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
|
||||
android:id="@+id/radio_button_language_en"
|
||||
android:layout_width="match_parent"
|
||||
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>
|
||||
</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"?>
|
||||
<resources>
|
||||
<color name="old_primary">#FFED7D31</color>
|
||||
<color name="primary">#FFFF9933</color>
|
||||
<color name="older_primary">#FFED7D31</color>
|
||||
<color name="old_primary">#FFFF9933</color>
|
||||
<color name="primary">#FFFFCC33</color>
|
||||
<color name="secondary">#FF000000</color>
|
||||
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="red">#FFFF0000</color>
|
||||
<color name="gray_69">#FF696969</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
|
||||
<color name="pastel_red">#FFFF6666</color>
|
||||
<color name="pastel_green">#FF00CC99</color>
|
||||
@@ -32,5 +34,6 @@
|
||||
<color name="cal_week_free">#FF00CC99</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>
|
||||
@@ -16,4 +16,5 @@
|
||||
<string name="lang_choose">Vybrat</string>
|
||||
<string name="splash_screen">splash screen</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>
|
||||
@@ -75,4 +75,21 @@
|
||||
<item name="android:strokeWidth">5</item>
|
||||
<item name="cornerRadius">@dimen/corner_radius</item>
|
||||
</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>
|
||||