update README and About App and fix 'fetch new data animation in the toolbar'

This commit is contained in:
Odweta
2024-02-29 19:52:26 +01:00
parent 836418ebf0
commit 8d06e4dec9
29 changed files with 29 additions and 316 deletions
+1 -1
View File
@@ -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",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

+1 -1
View File
@@ -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>