update README and About App and fix 'fetch new data animation in the toolbar'
@@ -12,7 +12,7 @@ android {
|
||||
minSdk = 28
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0.3"
|
||||
versionName = "1.0.4"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
||||
@@ -152,29 +152,38 @@ class MainFragment : Fragment() {
|
||||
private fun fetchNewData() {
|
||||
lifecycleScope.launch {
|
||||
done = false
|
||||
while (!done || !Util.internetAvail(requireContext())) {
|
||||
toolbar.text = String.format("%s", "Načítání nových dat")
|
||||
delay(300)
|
||||
toolbar.text = String.format("%s", "Načítání nových dat.")
|
||||
delay(300)
|
||||
toolbar.text = String.format("%s", "Načítání nových dat..")
|
||||
delay(300)
|
||||
toolbar.text = String.format("%s", "Načítání nových dat...")
|
||||
delay(300)
|
||||
toolbar.text = String.format("%s", "Načítání nových dat..")
|
||||
delay(300)
|
||||
toolbar.text = String.format("%s", "Načítání nových dat.")
|
||||
delay(300)
|
||||
toolbar.text = String.format("%s", "Načítání nových dat")
|
||||
delay(300)
|
||||
|
||||
// variables for the loading animation
|
||||
val loadingArray: Array<String> = arrayOf(
|
||||
"Načítání nových dat",
|
||||
"Načítání nových dat.",
|
||||
"Načítání nových dat..",
|
||||
"Načítání nových dat..."
|
||||
)
|
||||
val delayTime: Long = 300 // delay in ms
|
||||
|
||||
// show a loading animation
|
||||
while (!done && Util.internetAvail(requireContext())) {
|
||||
for (text in loadingArray) {
|
||||
toolbar.text = text
|
||||
delay(delayTime)
|
||||
}
|
||||
for (text in loadingArray.reversedArray()) {
|
||||
if (loadingArray.indexOf(text) != 0) {
|
||||
toolbar.text = text
|
||||
delay(delayTime)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// determine the role of the student
|
||||
role = if (Parsing.userIsParent()) {
|
||||
" – Rodič"
|
||||
} else {
|
||||
" – Student"
|
||||
}
|
||||
|
||||
// display the full name of the user in the toolbar
|
||||
toolbar.text =
|
||||
String.format(
|
||||
"%s",
|
||||
|
||||
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 719 B |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 292 B |
@@ -12,7 +12,7 @@
|
||||
<string name="about_app">O aplikaci</string>
|
||||
<string name="sign_out_warning">Opravdu se chcete odhlásit? Tato akce zavře aplikaci.</string>
|
||||
<string name="slogan">Přehlednost je podstata.</string>
|
||||
<string name="desc_about">Vylepšená verze mobilní aplikace ŠkolaOnLine</string>
|
||||
<string name="desc_about">Odlehčená verze mobilní aplikace Škola OnLine</string>
|
||||
<string name="odweta"> \@Odweta</string>
|
||||
<string name="development_vyvoj">Vývoj: </string>
|
||||
<string name="source_code">Zdrojový kód</string>
|
||||
|
||||