-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,254 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
app/src/main/java/com/hfut/schedule/logic/enums/BottomBarItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.hfut.schedule.logic.enums | ||
|
||
enum class BottomBarItems { | ||
COURSES, | ||
FOCUS, | ||
SEARCH, | ||
SETTINGS | ||
enum class BottomBarItems(val page : Int) { | ||
COURSES(0), | ||
FOCUS(1), | ||
SEARCH(2), | ||
SETTINGS(3) | ||
} |
8 changes: 4 additions & 4 deletions
8
app/src/main/java/com/hfut/schedule/logic/enums/CardBarItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package com.hfut.schedule.logic.enums | ||
|
||
enum class CardBarItems { | ||
BILLS, | ||
COUNT, | ||
HOME | ||
enum class CardBarItems(val page : Int) { | ||
BILLS(0), | ||
COUNT(1), | ||
HOME(2) | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/hfut/schedule/logic/enums/FixBarItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.hfut.schedule.logic.enums | ||
|
||
enum class FixBarItems { | ||
Fix,About | ||
enum class FixBarItems(val page : Int) { | ||
Fix(0),About(1) | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/hfut/schedule/logic/enums/GradeBarItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.hfut.schedule.logic.enums | ||
|
||
enum class GradeBarItems { | ||
GRADE,COUNT | ||
enum class GradeBarItems(val page : Int) { | ||
GRADE(0),COUNT(1) | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/hfut/schedule/logic/enums/NewsBarItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.hfut.schedule.logic.enums | ||
|
||
enum class NewsBarItems { | ||
News,XuanCheng,School | ||
enum class NewsBarItems(val page : Int) { | ||
News(0),XuanCheng(1),School(2) | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/hfut/schedule/logic/enums/ShowerBarItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.hfut.schedule.logic.enums | ||
|
||
enum class ShowerBarItems { | ||
HOME,BILLS,FUNCTION | ||
enum class ShowerBarItems(val page : Int) { | ||
HOME(0),BILLS(1),FUNCTION(2) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,4 +91,11 @@ object Starter { | |
MyApplication.context.startActivity(it) | ||
} | ||
|
||
fun emailMe() { | ||
val it = Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:[email protected]")) | ||
it.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) | ||
MyApplication.context.startActivity(it) | ||
} | ||
|
||
|
||
} |
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/hfut/schedule/logic/utils/getCelebration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.hfut.schedule.logic.utils | ||
|
||
import com.google.gson.Gson | ||
import com.hfut.schedule.App.MyApplication | ||
import com.hfut.schedule.logic.beans.MyAPIResponse | ||
import com.hfut.schedule.logic.utils.SharePrefs.prefs | ||
import com.hfut.schedule.viewmodel.NetWorkViewModel | ||
|
||
fun getCelebration() : Boolean { | ||
val json = prefs.getString("my",MyApplication.NullMy) | ||
return try { | ||
Gson().fromJson(json,MyAPIResponse::class.java).SettingsInfo.celebration | ||
} catch (e: Exception) { | ||
false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.