Browse Source

the no lesson card now has the correct text color

* updated material-dialogs to version 3.1.0
pull/31/head
Jannik 3 years ago
parent
commit
f52151fbf1
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
  1. 6
      app/build.gradle
  2. 8
      app/src/main/java/org/mosad/seil0/projectlaogai/fragments/HomeFragment.kt

6
app/build.gradle

@ -13,7 +13,7 @@ android {
minSdkVersion 23
targetSdkVersion 28
versionCode 14
versionName "0.4.93"
versionName "0.4.94"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue "string", "build_time", buildTime()
setProperty("archivesBaseName", "projectlaogai-$versionName")
@ -44,8 +44,8 @@ dependencies {
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.afollestad:aesthetic:1.0.0-beta05'
implementation 'com.afollestad.material-dialogs:core:2.8.1'
implementation 'com.afollestad.material-dialogs:color:2.8.1'
implementation 'com.afollestad.material-dialogs:core:3.1.0'
implementation 'com.afollestad.material-dialogs:color:3.1.0'
implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0'

8
app/src/main/java/org/mosad/seil0/projectlaogai/fragments/HomeFragment.kt

@ -28,7 +28,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import com.afollestad.materialdialogs.MaterialDialog
import kotlinx.android.synthetic.main.fragment_home.*
@ -75,8 +74,6 @@ class HomeFragment : Fragment() {
val cal = Calendar.getInstance()
val mensaCardView = DayCardView(context!!)
uiThread {
if (isAdded) {
@ -116,7 +113,6 @@ class HomeFragment : Fragment() {
}
}
/**
@ -194,12 +190,13 @@ class HomeFragment : Fragment() {
* @param startDayIndex the day index you want to start searching
* @return a DayCardView with all lessons added
*/
private fun findNextDay(startWeekIndex: Int, startDayIndex: Int) : DayCardView{
private fun findNextDay(startWeekIndex: Int, startDayIndex: Int) : DayCardView {
val cal = Calendar.getInstance()
var dayCardView = DayCardView(context!!)
var dayTimetable: TimetableDay? = null
var dayIndexSearch = startDayIndex
var weekIndexSearch = startWeekIndex
loop@ while (dayTimetable == null && weekIndexSearch <= timetables.size) {
for (i in (dayIndexSearch) ..5) {
dayTimetable = timetables[weekIndexSearch].timetable.days[i]
@ -229,7 +226,6 @@ class HomeFragment : Fragment() {
private fun getNoCard(text: String): TextView {
val noLesson = TextView(context)
noLesson.text = text
noLesson.setTextColor(ContextCompat.getColor(context!!, R.color.textPrimary))
noLesson.textSize = 18.0F
noLesson.setTypeface(null, Typeface.BOLD)
noLesson.textAlignment = View.TEXT_ALIGNMENT_CENTER

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close