version 0.1.3

* added german translation
This commit is contained in:
2018-11-02 20:54:41 +01:00
parent ac80c197c1
commit a58d6436b3
7 changed files with 53 additions and 31 deletions

View File

@ -32,7 +32,6 @@ import android.view.MenuItem
import androidx.fragment.app.FragmentTransaction
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.app_bar_main.*
import org.jetbrains.anko.custom.async
import org.jetbrains.anko.doAsync
import org.mosad.seil0.projectlaogai.fragments.HomeFragment
import org.mosad.seil0.projectlaogai.fragments.MensaFragment
@ -151,7 +150,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
println(course.course)
println(course.courseTTLink)
// the app is hanging here
// the app is hanging here TODO show loading dialog
doAsync {
timeTableWeek = timeTableParser.getTimeTable(course.courseTTLink.replace("http", "https"))
}.get()
@ -159,8 +158,6 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
/**
* load the mensa menus of the current week
* TODO show loading screen while loading
* TODO make mensa and timetable query parallel (use coroutines)
* TODO evaluate if we should use a timeout here
*/
private fun load() {

View File

@ -92,7 +92,7 @@ class HomeFragment : Fragment() {
for (i in 0..5) {
val lessonCardView = LessonCardView(context!!, null)
lessonCardView.getTxtViewLesson().text = timeTableDay[i].lessonSubject + "\n"
lessonCardView.getTxtViewLesson().text = resources.getString(R.string.string_new_line, timeTableDay[i].lessonSubject)
lessonCardView.getTxtViewLesson().append(timeTableDay[i].lessonTeacher + "\n")
lessonCardView.getTxtViewLesson().append(timeTableDay[i].lessonRoom)
lessonCardView.getTxtViewTime().text = DataTypes().getTime()[i]
@ -105,7 +105,7 @@ class HomeFragment : Fragment() {
if (linLayoutTimeTable.childCount == 0) {
// TODO we could display the next day with a lecture
val noLessonCardView = LessonCardView(context!!, null)
noLessonCardView.getTxtViewLesson().text = resources.getString(R.string.no_lesson_today) + "\n"
noLessonCardView.getTxtViewLesson().text = resources.getString(R.string.no_lesson_today)
linLayoutTimeTable.addView(noLessonCardView)
}
}

View File

@ -68,7 +68,7 @@ class MensaParser {
Calendar.THURSDAY -> "Don"
Calendar.FRIDAY -> "Fre"
Calendar.SATURDAY -> "Sam"
else -> "TODAY" //TODO
else -> "TODAY"
}
for (meal in mealList) {