Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
e6c4096787 | |||
b083e44711 | |||
2df58311cb | |||
f6f652ffb6 | |||
8fa0d496c6 | |||
0607d58760 | |||
3cd831e72c |
@ -5,13 +5,15 @@ apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
}
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
applicationId "org.mosad.seil0.projectlaogai"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
versionCode 6
|
||||
versionName "0.2.1"
|
||||
versionCode 8
|
||||
versionName "0.3.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
@ -27,15 +29,14 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation 'androidx.appcompat:appcompat:1.0.1'
|
||||
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 'org.jsoup:jsoup:1.11.3'
|
||||
implementation 'org.jetbrains.anko:anko-commons:0.10.7'
|
||||
implementation 'com.afollestad.material-dialogs:core:2.0.0-beta4'
|
||||
implementation 'com.afollestad.material-dialogs:color:2.0.0-beta4'
|
||||
|
||||
implementation 'com.afollestad.material-dialogs:core:2.0.0-beta5'
|
||||
implementation 'com.afollestad.material-dialogs:color:2.0.0-beta5'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:icon="@mipmap/ic_laogai_icon"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:roundIcon="@mipmap/ic_laogai_icon"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
|
BIN
app/src/main/ic_laogai_icon-web.png
Normal file
After Width: | Height: | Size: 39 KiB |
@ -50,7 +50,8 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
|
||||
private var weekMenus = ArrayList<Meal>()
|
||||
private var courseTTLinkList = ArrayList<CourseTTLink>()
|
||||
private var timeTableWeek = arrayOf<Array<Lesson>>()
|
||||
private var timeTableCurrentWeek = arrayOf<Array<Lesson>>()
|
||||
private var timeTableNextWeek = arrayOf<Array<Lesson>>()
|
||||
|
||||
private lateinit var course: CourseTTLink
|
||||
|
||||
@ -129,9 +130,6 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
}
|
||||
R.id.nav_moodle -> {
|
||||
|
||||
}
|
||||
R.id.nav_email -> {
|
||||
|
||||
}
|
||||
R.id.nav_settings -> {
|
||||
val settingsFragment = SettingsFragment()
|
||||
@ -163,7 +161,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
apply()
|
||||
}
|
||||
|
||||
timeTableWeek = timeTableParser.getTimeTable(course.courseTTLink.replace("http", "https"))
|
||||
timeTableCurrentWeek = timeTableParser.getTimeTable(course.courseTTLink.replace("http", "https"))
|
||||
}
|
||||
|
||||
/**
|
||||
@ -192,13 +190,21 @@ 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 {
|
||||
weekMenus = mensaParser.getMensaMenu()
|
||||
}
|
||||
|
||||
val t2 = doAsync {
|
||||
try {
|
||||
timeTableWeek = timeTableParser.getTimeTable(course.courseTTLink)
|
||||
timeTableCurrentWeek = timeTableParser.getTimeTable(course.courseTTLink)
|
||||
} catch (e: Exception) {
|
||||
|
||||
uiThread {
|
||||
@ -223,8 +229,12 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
return courseTTLinkList
|
||||
}
|
||||
|
||||
fun getCurrentTimeTableWeek(): Array<Array<Lesson>> {
|
||||
return timeTableWeek
|
||||
fun getTimeTableCurrentWeek(): Array<Array<Lesson>> {
|
||||
return timeTableCurrentWeek
|
||||
}
|
||||
|
||||
fun getTimeTableNextWeek(): Array<Array<Lesson>> {
|
||||
return timeTableNextWeek
|
||||
}
|
||||
|
||||
fun getWeekMenu(): ArrayList<Meal>{
|
||||
|
@ -64,22 +64,42 @@ class HomeFragment : Fragment() {
|
||||
|
||||
/**
|
||||
* add the current mensa meal to the home screens
|
||||
* TODO show meals of the next day if its later than 1500
|
||||
*/
|
||||
private fun addCurrentMensaMenu() {
|
||||
doAsync {
|
||||
val dayMenus: ArrayList<Meal> = MensaParser().getMensaMenuDay(mainActivity.getWeekMenu(), Calendar.getInstance().get(Calendar.DAY_OF_WEEK))
|
||||
val dayMenus: ArrayList<Meal>
|
||||
val cal = Calendar.getInstance()
|
||||
|
||||
// TODO needs testing
|
||||
if (cal.get(Calendar.HOUR_OF_DAY) < 15) {
|
||||
dayMenus = MensaParser().getMensaMenuDay(mainActivity.getWeekMenu(), cal.get(Calendar.DAY_OF_WEEK))
|
||||
} 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)
|
||||
}
|
||||
}
|
||||
|
||||
uiThread {
|
||||
|
||||
if (dayMenus.size >= 2) {
|
||||
for (part in dayMenus[0].parts) {
|
||||
txtViewMenu1.append(part)
|
||||
// get the index of the first meal, not a "Schneller Teller"
|
||||
loop@ for ((i, meal) in dayMenus.withIndex()) {
|
||||
if(meal.heading.contains("Essen")) {
|
||||
for (part in dayMenus[i].parts) {
|
||||
txtViewMenu1.append(part)
|
||||
}
|
||||
|
||||
for (part in dayMenus[i + 1].parts) {
|
||||
txtViewMenu2.append(part)
|
||||
}
|
||||
|
||||
break@loop
|
||||
}
|
||||
}
|
||||
|
||||
for (part in dayMenus[1].parts) {
|
||||
txtViewMenu2.append(part)
|
||||
}
|
||||
} else {
|
||||
txtViewMenu1.text = resources.getString(R.string.no_meal_today)
|
||||
txtViewMenu2.text = resources.getString(R.string.no_meal_today)
|
||||
@ -95,9 +115,9 @@ class HomeFragment : Fragment() {
|
||||
private fun addCurrentTimeTable() {
|
||||
val dayIndex = NotRetardedCalendar().getDayOfWeekIndex()
|
||||
|
||||
if (mainActivity.getCurrentTimeTableWeek().isNotEmpty() && dayIndex < 6) {
|
||||
if (mainActivity.getTimeTableCurrentWeek().isNotEmpty() && dayIndex < 6) {
|
||||
|
||||
val timeTableDay = mainActivity.getCurrentTimeTableWeek()[dayIndex]
|
||||
val timeTableDay = mainActivity.getTimeTableCurrentWeek()[dayIndex]
|
||||
|
||||
for (i in 0..5) {
|
||||
val lessonCardView = LessonCardView(context!!, null)
|
||||
|
@ -71,7 +71,7 @@ class MensaFragment : Fragment() {
|
||||
Calendar.THURSDAY -> "Don"
|
||||
Calendar.FRIDAY -> "Fre"
|
||||
Calendar.SATURDAY -> "Sam"
|
||||
else -> "TODAY" //TODO
|
||||
else -> "TODAY" // the app will likely crash here
|
||||
}
|
||||
|
||||
val cardViewMensaDay = MensaDayCardView(context!!, null)
|
||||
|
@ -62,28 +62,23 @@ class TimeTableFragment : Fragment() {
|
||||
|
||||
/**
|
||||
* add the remaining days of the current week to the timetable screen
|
||||
* TODO show the current day and the following 5 days
|
||||
*/
|
||||
private fun addCurrentWeek() {
|
||||
val dayIndex = NotRetardedCalendar().getDayOfWeekIndex()
|
||||
val formatter = SimpleDateFormat("E dd.MM", Locale.GERMANY) // TODO change to android call when min api is 24
|
||||
val calendar = Calendar.getInstance()
|
||||
|
||||
doAsync {
|
||||
|
||||
uiThread {
|
||||
|
||||
println(dayIndex)
|
||||
// add current weeks days
|
||||
for(day in dayIndex..5) {
|
||||
|
||||
val formatter = SimpleDateFormat("E dd.MM", Locale.GERMANY) // TODO change to android call when min api is 24
|
||||
val calendar = Calendar.getInstance()
|
||||
calendar.firstDayOfWeek = Calendar.MONDAY
|
||||
calendar.add(Calendar.DATE,day - Calendar.getInstance().get(Calendar.DAY_OF_WEEK))
|
||||
|
||||
val cardViewTimeTableDay = MensaDayCardView(context!!, null)
|
||||
cardViewTimeTableDay.setDayHeading(formatter.format(calendar.time))
|
||||
|
||||
// for each lessen of the day
|
||||
for((i, lesson) in mainActivity.getCurrentTimeTableWeek()[dayIndex].withIndex()) {
|
||||
for((i, lesson) in mainActivity.getTimeTableCurrentWeek()[day].withIndex()) {
|
||||
val lessonCardView = LessonCardView(context!!, null)
|
||||
lessonCardView.setBackgroundColor(Color.TRANSPARENT)
|
||||
|
||||
@ -96,11 +91,39 @@ class TimeTableFragment : Fragment() {
|
||||
cardViewTimeTableDay.getLinLayoutMensaDay().addView(lessonCardView)
|
||||
}
|
||||
|
||||
// TODO if there is no lesson at one day , show a no lesson card
|
||||
|
||||
calendar.add(Calendar.DATE,1)
|
||||
linLayoutTTFragment.addView(cardViewTimeTableDay)
|
||||
}
|
||||
|
||||
// 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!)
|
||||
|
||||
for(day in 0..(dayIndex - 1)) {
|
||||
|
||||
val cardViewTimeTableDay = MensaDayCardView(context!!, null)
|
||||
cardViewTimeTableDay.setDayHeading(formatter.format(calendar.time))
|
||||
|
||||
// for each lessen of the day
|
||||
for((i, lesson) in mainActivity.getTimeTableNextWeek()[day].withIndex()) {
|
||||
val lessonCardView = LessonCardView(context!!, null)
|
||||
lessonCardView.setBackgroundColor(Color.TRANSPARENT)
|
||||
|
||||
lessonCardView.getTxtViewLesson().text = resources.getString(R.string.string_new_line, lesson.lessonSubject)
|
||||
lessonCardView.getTxtViewLesson().append(lesson.lessonTeacher + "\n")
|
||||
lessonCardView.getTxtViewLesson().append(lesson.lessonRoom)
|
||||
lessonCardView.getTxtViewTime().text = DataTypes().getTime()[i]
|
||||
|
||||
if(lessonCardView.getTxtViewLesson().text.length > 2)
|
||||
cardViewTimeTableDay.getLinLayoutMensaDay().addView(lessonCardView)
|
||||
}
|
||||
|
||||
calendar.add(Calendar.DATE,1)
|
||||
linLayoutTTFragment.addView(cardViewTimeTableDay)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO if there is no lesson at one day , show a no lesson card
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class TimeTableParser {
|
||||
return courseTTLinkList
|
||||
}
|
||||
|
||||
|
||||
@Suppress("unused")
|
||||
fun printTimeTableWeek (timeTableWeek: Array<Array<Lesson>>) {
|
||||
|
||||
for (j in 0..5) print(days[j].padEnd(25 ,' ') + " | ")
|
||||
|
@ -40,7 +40,7 @@ class LessonCardView @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
txtViewTime = findViewById(R.id.txtView_Time)
|
||||
|
||||
// workaround to prevent a white border
|
||||
this.setBackgroundColor(Color.parseColor("#3F51B5"))
|
||||
this.setBackgroundColor(Color.TRANSPARENT)
|
||||
}
|
||||
|
||||
fun getTxtViewLesson(): TextView {
|
||||
|
Before Width: | Height: | Size: 6.2 KiB |
@ -1,34 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0"/>
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1"/>
|
||||
</vector>
|
@ -4,10 +4,12 @@
|
||||
<item
|
||||
android:drawable="@color/colorPrimary"/>
|
||||
|
||||
<item>
|
||||
<!--TODO when minAPI is 23 use this-->
|
||||
<!--<item android:gravity="center" android:width="144dp" android:height="144dp">-->
|
||||
<item android:gravity="center">
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_launcher"/>
|
||||
android:gravity="fill_horizontal|fill_vertical"
|
||||
android:src="@mipmap/ic_laogai_icon_splash"/>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="108dp"
|
||||
android:width="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_local_dining_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M8.1,13.34l2.83,-2.83L3.91,3.5c-1.56,1.56 -1.56,4.09 0,5.66l4.19,4.18zM14.88,11.53c1.53,0.71 3.68,0.21 5.27,-1.38 1.91,-1.91 2.28,-4.65 0.81,-6.12 -1.46,-1.46 -4.2,-1.1 -6.12,0.81 -1.59,1.59 -2.09,3.74 -1.38,5.27L3.7,19.87l1.41,1.41L12,14.41l6.88,6.88 1.41,-1.41L13.41,13l1.47,-1.47z"/>
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z"/>
|
||||
</vector>
|
@ -5,5 +5,5 @@
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20,3L4,3v10c0,2.21 1.79,4 4,4h6c2.21,0 4,-1.79 4,-4v-3h2c1.11,0 2,-0.9 2,-2L22,5c0,-1.11 -0.89,-2 -2,-2zM20,8h-2L18,5h2v3zM4,19h16v2L4,21z"/>
|
||||
android:pathData="M5,13.18v4L12,21l7,-3.82v-4L12,17l-7,-3.82zM12,3L1,9l11,6 9,-4.91V17h2V9L12,3z"/>
|
||||
</vector>
|
@ -1,9 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
|
||||
android:width="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path android:fillColor="#FF000000"
|
||||
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
|
||||
</vector>
|
||||
|
@ -20,7 +20,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/design_default_color_primary"
|
||||
android:background="@color/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
@ -19,12 +19,11 @@
|
||||
android:layout_marginEnd="5dp"
|
||||
android:clickable="false"
|
||||
android:maxHeight="125dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent" android:elevation="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
@ -51,14 +50,12 @@
|
||||
android:id="@+id/cardView2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="125dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardView">
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardView" android:elevation="5dp"
|
||||
android:layout_marginEnd="5dp" android:layout_marginStart="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
@ -88,7 +85,8 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardView2" android:id="@+id/scrollViewTimeTable"
|
||||
android:background="@color/colorPrimary" android:paddingTop="6dp">
|
||||
android:background="@color/md_divider_dark_theme" android:paddingTop="6dp"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linLayoutTimeTable"
|
||||
|
@ -5,8 +5,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@android:color/background_light"
|
||||
app:contentPadding="5dp" app:cardElevation="5dp"
|
||||
app:cardUseCompatPadding="true" app:cardPreventCornerOverlap="false" app:cardCornerRadius="12dp">
|
||||
app:cardElevation="5dp"
|
||||
app:cardUseCompatPadding="true" app:cardPreventCornerOverlap="false" app:contentPadding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -12,7 +12,7 @@
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" android:id="@+id/linLayout_MensaDay">
|
||||
android:layout_height="wrap_content" android:id="@+id/linLayout_MensaDay" android:paddingBottom="5dp">
|
||||
<TextView
|
||||
android:text="@string/sample_date"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -11,7 +11,6 @@
|
||||
android:layout_marginEnd="5dp"
|
||||
android:clickable="false"
|
||||
android:maxHeight="125dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
|
@ -17,7 +17,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||
app:srcCompat="@mipmap/ic_launcher_round"
|
||||
app:srcCompat="@mipmap/ic_laogai_icon"
|
||||
android:contentDescription="@string/nav_header_desc"
|
||||
android:id="@+id/imageView"/>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<item android:id="@+id/nav_home" android:title="@string/home" android:icon="@drawable/ic_baseline_home_24dp"/>
|
||||
<item
|
||||
android:id="@+id/nav_mensa"
|
||||
android:icon="@drawable/ic_free_breakfast_black_24dp"
|
||||
android:icon="@drawable/ic_local_dining_black_24dp"
|
||||
android:title="@string/mensa"/>
|
||||
<item
|
||||
android:id="@+id/nav_timetable"
|
||||
@ -15,12 +15,8 @@
|
||||
android:title="@string/timetable"/>
|
||||
<item
|
||||
android:id="@+id/nav_moodle"
|
||||
android:icon="@drawable/ic_menu_slideshow"
|
||||
android:icon="@drawable/ic_school_black_24dp"
|
||||
android:title="@string/moodle"/>
|
||||
<item
|
||||
android:id="@+id/nav_email"
|
||||
android:icon="@android:drawable/ic_dialog_email"
|
||||
android:title="@string/e_mail"/>
|
||||
<item
|
||||
android:id="@+id/nav_settings"
|
||||
android:icon="@drawable/ic_settings_black_24dp"
|
||||
|
@ -4,5 +4,5 @@
|
||||
<item android:id="@+id/action_settings"
|
||||
android:title="@string/settings"
|
||||
android:orderInCategory="100"
|
||||
app:showAsAction="never"/>
|
||||
app:showAsAction="never" android:visible="false"/>
|
||||
</menu>
|
||||
|
5
app/src/main/res/mipmap-anydpi-v26/ic_laogai_icon.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
BIN
app/src/main/res/mipmap-hdpi/ic_laogai_icon.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 4.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_laogai_icon.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_laogai_icon_splash.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_laogai_icon.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 6.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_laogai_icon.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 6.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_laogai_icon.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.9 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 15 KiB |
@ -4,10 +4,11 @@
|
||||
<string name="mensa">Mensa</string>
|
||||
<string name="timetable">Stundenplan</string>
|
||||
<string name="moodle">Moodle</string>
|
||||
<string name="e_mail">E-Mail</string>
|
||||
<string name="settings">Einstellungen</string>
|
||||
<string name="meal_1">Essen 1</string>
|
||||
<string name="meal_2">Essen 2</string>
|
||||
<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_more_food">Diese Woche keine weitere Essensausgabe</string>
|
||||
<string name="no_lesson_today">heute keine Vorlesung</string>
|
||||
@ -22,7 +23,6 @@
|
||||
<string name="select">auswählen</string>
|
||||
<string name="about">über</string>
|
||||
<string name="loading_timetable">lade Stundenplan …</string>
|
||||
<string name="hello_blank_fragment">bald ™</string>
|
||||
<string name="navigation_drawer_close">Navigationsleiste schließen</string>
|
||||
<string name="navigation_drawer_open">Navigationsleiste öffnen</string>
|
||||
</resources>
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">@color/design_default_color_primary</color>
|
||||
<color name="colorPrimaryDark">@color/design_default_color_primary_dark</color>
|
||||
<color name="colorPrimary">#000000</color>
|
||||
<color name="colorPrimaryDark">#000000</color>
|
||||
<color name="colorAccent">#d81b60</color>
|
||||
<color name="colorMensaDay">#ebe8e9</color>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
</resources>
|
||||
|
@ -4,5 +4,4 @@
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="nav_header_vertical_spacing">8dp</dimen>
|
||||
<dimen name="nav_header_height">176dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
</resources>
|
@ -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.2.1</string>
|
||||
<string name="nav_header_title" translatable="false">hso App 0.3.0</string>
|
||||
<string name="nav_header_subtitle" translatable="false">seil0@mosad.xyz</string>
|
||||
<string name="nav_header_desc" translatable="false">Project Laogai</string>
|
||||
|
||||
@ -10,11 +10,12 @@
|
||||
<string name="mensa">Mensa</string>
|
||||
<string name="timetable">Timetable</string>
|
||||
<string name="moodle">Moodle</string>
|
||||
<string name="e_mail">E-Mail</string>
|
||||
<string name="settings">Settings</string>
|
||||
|
||||
<string name="meal_1">Meal 1</string>
|
||||
<string name="meal_2">Meal 2</string>
|
||||
<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_more_food">No more Food this week</string>
|
||||
|
||||
@ -35,14 +36,13 @@
|
||||
<string name="primary_color">primary color</string>
|
||||
<string name="main_color_desc">The primary color, default is indigo</string>
|
||||
<string name="select">select</string>
|
||||
<string name="version" translatable="false">version 0.2.1</string>
|
||||
<string name="version" translatable="false">version 0.3.0</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 seil0@mosad.xyz "</string>
|
||||
<string name="loading_timetable">loading timetable …</string>
|
||||
|
||||
|
||||
<string name="hello_blank_fragment">soon ™</string>
|
||||
<string name="string_new_line" translatable="false">%1$s\n</string>
|
||||
|
||||
<string name="save_key_course" translatable="false">org.mosad.seil0.projectlaogai.course</string>
|
||||
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<full-backup-content>
|
||||
<!-- Exclude specific shared preferences that contain GCM registration Id -->
|
||||
</full-backup-content>
|
@ -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.0'
|
||||
ext.kotlin_version = '1.3.10'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|