Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
75a457312d | |||
87bf614d28 | |||
e69354af96 | |||
ec74a8e4f8 | |||
b49d16b1a1 | |||
70059b4b0c |
@ -32,12 +32,14 @@ dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
||||
implementation 'org.jsoup:jsoup:1.11.3'
|
||||
implementation 'org.jetbrains.anko:anko-commons:0.10.8'
|
||||
implementation 'com.afollestad.material-dialogs:core:2.0.0-rc1'
|
||||
implementation 'com.afollestad.material-dialogs:color:2.0.0-rc1'
|
||||
implementation 'com.afollestad:aesthetic:1.0.0-beta05'
|
||||
implementation 'com.afollestad.material-dialogs:core:2.0.0-rc5'
|
||||
implementation 'com.afollestad.material-dialogs:color:2.0.0-rc5'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
}
|
||||
|
@ -13,12 +13,12 @@
|
||||
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/SplashTheme"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -22,6 +22,7 @@
|
||||
|
||||
package org.mosad.seil0.projectlaogai
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
@ -29,6 +30,7 @@ import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import com.afollestad.aesthetic.Aesthetic
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.google.android.material.navigation.NavigationView
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
@ -50,16 +52,33 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
private var timeTableNextWeek = arrayOf<Array<Lesson>>()
|
||||
|
||||
private lateinit var course: CourseTTLink
|
||||
private var color: Int = Color.BLACK
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
Aesthetic.attach(this)
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
|
||||
// load mensa and timetable
|
||||
// load mensa, timetable and color
|
||||
load()
|
||||
|
||||
// If we haven't set any defaults, do that now
|
||||
if (Aesthetic.isFirstTime) {
|
||||
// this is executed on the first app start, use this to show tutorial etc.
|
||||
Aesthetic.config {
|
||||
colorPrimary(Color.BLACK)
|
||||
colorPrimaryDark(Color.BLACK)
|
||||
apply()
|
||||
}
|
||||
} else {
|
||||
Aesthetic.config {
|
||||
colorPrimary(color)
|
||||
colorPrimaryDark(color)
|
||||
apply()
|
||||
}
|
||||
}
|
||||
|
||||
//init home fragment TODO make a abstract fragment class
|
||||
val homeFragment = HomeFragment()
|
||||
homeFragment.setMainActivity(this)
|
||||
@ -76,6 +95,16 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
nav_view.setNavigationItemSelectedListener(this)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
Aesthetic.resume(this)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
Aesthetic.pause(this)
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (drawer_layout.isDrawerOpen(GravityCompat.START)) {
|
||||
drawer_layout.closeDrawer(GravityCompat.START)
|
||||
@ -126,11 +155,11 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
|
||||
}
|
||||
R.id.nav_moodle -> {
|
||||
// val moodleFragment = MoodleFragment()
|
||||
//
|
||||
// val fragmentTransaction: FragmentTransaction = supportFragmentManager.beginTransaction()
|
||||
// fragmentTransaction.replace(R.id.fragment_container, moodleFragment)
|
||||
// fragmentTransaction.commit()
|
||||
val moodleFragment = MoodleFragment()
|
||||
|
||||
val fragmentTransaction: FragmentTransaction = supportFragmentManager.beginTransaction()
|
||||
fragmentTransaction.replace(R.id.fragment_container, moodleFragment)
|
||||
fragmentTransaction.commit()
|
||||
}
|
||||
R.id.nav_settings -> {
|
||||
val settingsFragment = SettingsFragment()
|
||||
@ -165,6 +194,17 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
timeTableCurrentWeek = timeTableParser.getTimeTable(course.courseTTLink.replace("http", "https"))
|
||||
}
|
||||
|
||||
/**
|
||||
* save the primary color
|
||||
*/
|
||||
fun saveColorPrimary(color : Int) {
|
||||
val sharedPref = getPreferences(MODE_PRIVATE) ?: return
|
||||
with (sharedPref.edit()) {
|
||||
putInt(getString(R.string.save_key_colorPrimary), color)
|
||||
apply()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load the mensa menus of the current week
|
||||
*/
|
||||
@ -178,11 +218,15 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
sharedPref.getString(getString(R.string.save_key_course), "AI3")!!
|
||||
)
|
||||
|
||||
// load saved color
|
||||
color = sharedPref.getInt(getString(R.string.save_key_colorPrimary), Color.BLACK)
|
||||
|
||||
/**
|
||||
* load mensa, course timetable and courselist from the swfr/hso website
|
||||
* TODO make an API see https://git.mosad.xyz/Seil0/TheCitadelofRicks
|
||||
*/
|
||||
val time = measureTimeMillis {
|
||||
|
||||
/* getting the course list should be faster than the timetable,
|
||||
* we need have time until the user opens the dialog
|
||||
*/
|
||||
@ -190,19 +234,11 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
courseTTLinkList = timeTableParser.getCourseTTLinks()
|
||||
}
|
||||
|
||||
doAsync {
|
||||
try {
|
||||
timeTableNextWeek = timeTableParser.getTimeTable(course.courseTTLink.replace("week=0","week=1"))
|
||||
} catch (e: Exception) {
|
||||
e.stackTrace
|
||||
}
|
||||
}
|
||||
|
||||
val t1 = doAsync {
|
||||
val jobMenus = doAsync {
|
||||
weekMenus = mensaParser.getMensaMenu()
|
||||
}
|
||||
|
||||
val t2 = doAsync {
|
||||
val jobTTCurrentWeek = doAsync {
|
||||
try {
|
||||
timeTableCurrentWeek = timeTableParser.getTimeTable(course.courseTTLink)
|
||||
} catch (e: Exception) {
|
||||
@ -218,11 +254,19 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
}
|
||||
}
|
||||
|
||||
t1.get()
|
||||
t2.get()
|
||||
val jobTTNextWeek = doAsync {
|
||||
try {
|
||||
timeTableNextWeek = timeTableParser.getTimeTable(course.courseTTLink.replace("week=0","week=1"))
|
||||
} catch (e: Exception) {
|
||||
e.stackTrace
|
||||
}
|
||||
}
|
||||
|
||||
jobMenus.get()
|
||||
jobTTCurrentWeek.get()
|
||||
jobTTNextWeek.get()
|
||||
}
|
||||
println("Completed in $time ms")
|
||||
|
||||
}
|
||||
|
||||
fun getCourseTTLinkList(): ArrayList<CourseTTLink>{
|
||||
@ -233,7 +277,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
return timeTableCurrentWeek
|
||||
}
|
||||
|
||||
fun getTimeTableNextWeek(): Array<Array<Lesson>> {
|
||||
fun getTimeTableNextWeek(): Array<Array<Lesson>> {
|
||||
return timeTableNextWeek
|
||||
}
|
||||
|
||||
@ -245,4 +289,8 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
return course
|
||||
}
|
||||
|
||||
fun getColorPrimary(): Int {
|
||||
return color
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -75,7 +75,6 @@ class HomeFragment : Fragment() {
|
||||
} else {
|
||||
dayMenus = MensaParser().getMensaMenuDay(mainActivity.getWeekMenu(), cal.get(Calendar.DAY_OF_WEEK) + 1)
|
||||
uiThread {
|
||||
// TODO Mensa closed today is showing
|
||||
txtView_Menu1Heading.text = resources.getString(R.string.meal_1_tomorrow)
|
||||
txtView_Menu2Heading.text = resources.getString(R.string.meal_2_tomorrow)
|
||||
}
|
||||
@ -86,16 +85,16 @@ class HomeFragment : Fragment() {
|
||||
if (dayMenus.size >= 2) {
|
||||
// get the index of the first meal, not a "Schneller Teller"
|
||||
loop@ for ((i, meal) in dayMenus.withIndex()) {
|
||||
if(meal.heading.contains("Essen")) {
|
||||
if (meal.heading.contains("Essen")) {
|
||||
for ((j, part) in dayMenus[i].parts.withIndex()) {
|
||||
txtViewMenu1.append(part)
|
||||
if(j < (dayMenus[i].parts.size - 2))
|
||||
if (j < (dayMenus[i].parts.size - 2))
|
||||
txtViewMenu1.append("\n")
|
||||
}
|
||||
|
||||
for ((j, part) in dayMenus[i + 1].parts.withIndex()) {
|
||||
txtViewMenu2.append(part)
|
||||
if(j < (dayMenus[i + 1].parts.size - 2))
|
||||
if (j < (dayMenus[i + 1].parts.size - 2))
|
||||
txtViewMenu2.append("\n")
|
||||
}
|
||||
|
||||
@ -104,8 +103,13 @@ class HomeFragment : Fragment() {
|
||||
}
|
||||
|
||||
} else {
|
||||
txtViewMenu1.text = resources.getString(R.string.no_meal_today)
|
||||
txtViewMenu2.text = resources.getString(R.string.no_meal_today)
|
||||
if (txtView_Menu1Heading.text == resources.getString(R.string.meal_1_tomorrow)) {
|
||||
txtViewMenu1.text = resources.getString(R.string.no_meal_tomorrow)
|
||||
txtViewMenu2.text = resources.getString(R.string.no_meal_tomorrow)
|
||||
} else {
|
||||
txtViewMenu1.text = resources.getString(R.string.no_meal_today)
|
||||
txtViewMenu2.text = resources.getString(R.string.no_meal_today)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -90,7 +90,7 @@ class MensaFragment : Fragment() {
|
||||
menuViewMenu.getTxtViewMenu().append("\n")
|
||||
}
|
||||
|
||||
cardViewMensaDay.setDayHeading(meal.day) //TODO move this out of the first for loop, performance!!
|
||||
cardViewMensaDay.setDayHeading(meal.day)
|
||||
cardViewMensaDay.getLinLayoutMensaDay().addView(menuViewMenu)
|
||||
add = true
|
||||
}
|
||||
|
@ -1,3 +1,25 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.mosad.seil0.projectlaogai.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
@ -5,8 +27,10 @@ import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import kotlinx.android.synthetic.main.fragment_moodle.*
|
||||
import android.webkit.WebSettings
|
||||
import android.webkit.WebView
|
||||
import org.mosad.seil0.projectlaogai.R
|
||||
import android.webkit.WebViewClient
|
||||
|
||||
/**
|
||||
* The moodle screen controller class
|
||||
@ -14,18 +38,21 @@ import org.mosad.seil0.projectlaogai.R
|
||||
*/
|
||||
class MoodleFragment : Fragment() {
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
val view: View = inflater.inflate(R.layout.fragment_settings, container, false)
|
||||
private lateinit var webView: WebView
|
||||
private lateinit var webSettings: WebSettings
|
||||
|
||||
//webView.loadUrl("www.google.de")
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
|
||||
val view: View = inflater.inflate(R.layout.fragment_moodle, container, false)
|
||||
|
||||
webView = view.findViewById(R.id.webView)
|
||||
webView.loadUrl("https://elearning.hs-offenburg.de/moodle/")
|
||||
|
||||
webSettings = webView.getSettings()
|
||||
//webSettings.setJavaScriptEnabled(true) // Enable Javascript
|
||||
|
||||
webView.setWebViewClient(WebViewClient()) // Force links and redirects to open in the WebView instead of in a browser
|
||||
|
||||
return view
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
//webView.loadUrl("www.google.de")
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -29,6 +29,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import com.afollestad.aesthetic.Aesthetic
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.color.colorChooser
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
@ -125,12 +126,19 @@ class SettingsFragment : Fragment() {
|
||||
|
||||
linLayoutMainColor.setOnClickListener {
|
||||
// open a new color chooser dialog
|
||||
val colors = intArrayOf(Color.BLACK, Color.RED, Color.GREEN, Color.BLUE)
|
||||
val colors = intArrayOf(Color.BLACK, Color.DKGRAY, Color.RED, Color.GREEN, Color.YELLOW)
|
||||
|
||||
MaterialDialog(context!!)
|
||||
.title(R.string.primary_color)
|
||||
.colorChooser(colors, initialSelection = Color.BLACK) { _, color ->
|
||||
.colorChooser(colors, allowCustomArgb = true,initialSelection = mainActivity.getColorPrimary()) { _, color ->
|
||||
viewPrimaryColor.setBackgroundColor(color)
|
||||
Aesthetic.config {
|
||||
colorPrimary(color)
|
||||
colorPrimaryDark(color)
|
||||
apply()
|
||||
}
|
||||
|
||||
mainActivity.saveColorPrimary(color)
|
||||
}
|
||||
.positiveButton(R.string.select)
|
||||
.show()
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -91,14 +91,25 @@ class TimeTableFragment : Fragment() {
|
||||
lessonCardView.getTxtViewLesson().append(lesson.lessonRoom)
|
||||
lessonCardView.getTxtViewTime().text = DataTypes().getTime()[i]
|
||||
|
||||
// only add the lesson if it contains data
|
||||
if(lessonCardView.getTxtViewLesson().text.length > 2)
|
||||
cardViewTimeTableDay.getLinLayoutMensaDay().addView(lessonCardView)
|
||||
}
|
||||
|
||||
calendar.add(Calendar.DATE,1)
|
||||
|
||||
// if the day contains no lessons add a text "No lesson today"
|
||||
if (cardViewTimeTableDay.getLinLayoutMensaDay().childCount <= 1) {
|
||||
val lessonCardView = LessonCardView(context!!, null)
|
||||
lessonCardView.setBackgroundColor(Color.TRANSPARENT)
|
||||
lessonCardView.getTxtViewLesson().text = resources.getString(R.string.no_lesson_today)
|
||||
cardViewTimeTableDay.getLinLayoutMensaDay().addView(lessonCardView)
|
||||
}
|
||||
|
||||
linLayoutTTFragment.addView(cardViewTimeTableDay)
|
||||
}
|
||||
|
||||
// TODO if there is no lesson at one day , show a no lesson card
|
||||
// add next weeks days, max number = dayIndex, if timetable was loaded
|
||||
if (mainActivity.getTimeTableNextWeek().isNotEmpty()) {
|
||||
calendar.add(Calendar.DATE,1) // before this we are at a sunday (no lecture on sundays!)
|
||||
@ -127,7 +138,6 @@ class TimeTableFragment : Fragment() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO if there is no lesson at one day , show a no lesson card
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -27,9 +27,16 @@ import org.jsoup.Jsoup
|
||||
class TimeTableParser {
|
||||
private val days = arrayOf("Monday", "Tuesday" ,"Wednesday", "Thursday", "Friday", "Saturday")
|
||||
private var courseTTLinkList = ArrayList<CourseTTLink>()
|
||||
private var timeTableWeek = arrayOf<Array<Lesson>>()
|
||||
|
||||
init {
|
||||
/**
|
||||
* get the timetable from the given url
|
||||
* the timetable is organised per row not per column;
|
||||
* Mon 1, Tue 1, Wed 1, Thur 1, Fri 1, Sat 1, Mon 2 and so on
|
||||
*/
|
||||
fun getTimeTable(courseTTURL: String): Array<Array<Lesson>> {
|
||||
var timeTableWeek = arrayOf<Array<Lesson>>()
|
||||
val scheduleHTML = Jsoup.connect(courseTTURL).get()
|
||||
|
||||
// create the timetable array
|
||||
for (i in 0..5) {
|
||||
var timeTableDay = arrayOf<Lesson>()
|
||||
@ -38,15 +45,6 @@ class TimeTableParser {
|
||||
}
|
||||
timeTableWeek += timeTableDay
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get the timetable from the given url
|
||||
* the timetable is organised per row not per column;
|
||||
* Mon 1, Tue 1, Wed 1, Thur 1, Fri 1, Sat 1, Mon 2 and so on
|
||||
*/
|
||||
fun getTimeTable(courseTTURL: String): Array<Array<Lesson>> {
|
||||
val scheduleHTML = Jsoup.connect(courseTTURL).get()
|
||||
|
||||
//val week = scheduleHTML.select("h1.timetable-caption").text()
|
||||
//println("$week successful!\n")
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ProjectLaogai
|
||||
*
|
||||
* Copyright 2018 <seil0@mosad.xyz>
|
||||
* Copyright 2019 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -2,8 +2,8 @@
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:centerColor="@color/colorPrimary"
|
||||
android:endColor="@color/colorPrimaryDark"
|
||||
android:startColor="@color/colorPrimary"
|
||||
android:centerColor="?colorPrimary"
|
||||
android:endColor="?colorPrimaryDark"
|
||||
android:startColor="?colorPrimary"
|
||||
android:type="linear"/>
|
||||
</shape>
|
@ -20,7 +20,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/colorPrimary"
|
||||
android:background="?colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
@ -137,7 +137,7 @@
|
||||
<View
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp" android:id="@+id/view_PrimaryColor"
|
||||
android:background="@color/colorPrimary"/>
|
||||
android:background="?colorPrimary"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -4,14 +4,15 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/nav_header_height"
|
||||
android:background="@drawable/side_nav_bar"
|
||||
android:background="@color/colorPrimary"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark"
|
||||
android:orientation="vertical"
|
||||
android:gravity="bottom">
|
||||
android:gravity="bottom"
|
||||
android:id="@+id/nav_header_main">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -10,8 +10,9 @@
|
||||
<string name="meal_1_tomorrow">Essen 1, Morgen</string>
|
||||
<string name="meal_2_tomorrow">Essen 1, Morgen</string>
|
||||
<string name="no_meal_today">heute keine Essensausgabe</string>
|
||||
<string name="no_meal_tomorrow">morgen keine Essensausgabe</string>
|
||||
<string name="no_more_food">Diese Woche keine weitere Essensausgabe</string>
|
||||
<string name="no_lesson_today">heute keine Vorlesung</string>
|
||||
<string name="no_lesson_today">heute keine Vorlesung!</string>
|
||||
<string name="error">Fehler</string>
|
||||
<string name="no_tt_error">Stundenplan konnte nicht geladen werden!</string>
|
||||
<string name="gen_tt_error">Allgemeiner Stundenplan Fehler!"</string>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<string name="app_name" translatable="false">Project Laogai</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="nav_header_title" translatable="false">hso App 0.3.1</string>
|
||||
<string name="nav_header_title" translatable="false">hso App 0.3.2</string>
|
||||
<string name="nav_header_subtitle" translatable="false">seil0@mosad.xyz</string>
|
||||
<string name="nav_header_desc" translatable="false">Project Laogai</string>
|
||||
|
||||
@ -17,9 +17,10 @@
|
||||
<string name="meal_1_tomorrow">Meal 1, tomorrow</string>
|
||||
<string name="meal_2_tomorrow">Meal 2, tomorrow</string>
|
||||
<string name="no_meal_today">Mensa closed today</string>
|
||||
<string name="no_meal_tomorrow">Mensa closed tomorrow</string>
|
||||
<string name="no_more_food">No more Food this week</string>
|
||||
|
||||
<string name="no_lesson_today">"no lecture today "</string>
|
||||
<string name="no_lesson_today">"No lecture today!"</string>
|
||||
<string name="error">Error</string>
|
||||
<string name="no_tt_error">Could not load timetable!"</string>
|
||||
<string name="gen_tt_error">There was an error with the timetable!"</string>
|
||||
@ -36,11 +37,11 @@
|
||||
<string name="primary_color">primary color</string>
|
||||
<string name="main_color_desc">The primary color, default is black</string>
|
||||
<string name="select">select</string>
|
||||
<string name="version" translatable="false">version 0.3.1</string>
|
||||
<string name="version" translatable="false">version 0.3.2</string>
|
||||
<string name="about">about</string>
|
||||
<string name="about_txtView" translatable="false">hso App by @Seil0</string>
|
||||
<string name="about_text" translatable="false">"This software is made by @Seil0 and is published under the terms and
|
||||
conditions of GPL 3. For further information visit \ngit.mosad.xyz/Seil0/ProjectLaogai \n\n© 2018
|
||||
conditions of GPL 3. For further information visit \ngit.mosad.xyz/Seil0/ProjectLaogai \n\n© 2018-2019
|
||||
seil0@mosad.xyz "
|
||||
</string>
|
||||
<string name="loading_timetable">loading timetable …</string>
|
||||
@ -50,4 +51,5 @@
|
||||
|
||||
<string name="save_key_course" translatable="false">org.mosad.seil0.projectlaogai.course</string>
|
||||
<string name="save_key_courseTTLink" translatable="false">org.mosad.seil0.projectlaogai.courseTTLink</string>
|
||||
<string name="save_key_colorPrimary" translatable="false">org.mosad.seil0.projectlaogai.colorPrimary</string>
|
||||
</resources>
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.10'
|
||||
ext.kotlin_version = '1.3.11'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
Reference in New Issue
Block a user