Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] Upgrade to Material 3 design, refactor some core elements #201

Merged
merged 64 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
af75049
Material 3 theme and color support, filled cards
santoni0 Oct 15, 2022
a26b5c9
Change drawer header, dark bottombar color
santoni0 Oct 22, 2022
1bb613e
Replace MaterialComponents with Material3
santoni0 Oct 28, 2022
446d2ec
wielki powrót pr m3 do szkolnego (nie czytajcie tego kodu)
santoni0 Nov 27, 2023
0d400af
fix M3 UI code & upgrade kotlin
sadorowo Jun 12, 2024
5bb7b8e
update dependencies
sadorowo Jun 12, 2024
2fa1474
fix missing Intent receiver flags for Tiramisu+
sadorowo Jun 13, 2024
04350ac
fix kapt errors related to SelectiveDAO + migrate BuildConfig
sadorowo Jun 13, 2024
2a0cd2f
adapt code to updated dependencies + align lessons (based by szkolny-…
sadorowo Jun 13, 2024
b404287
fix: no query filtering
sadorowo Jun 13, 2024
d9f3c37
fix: duplicated items in about card
sadorowo Jun 13, 2024
317100f
fix: "Back button opens drawer" (redundant super call)
sadorowo Jun 13, 2024
f03c833
fix: too small heading in agenda dialog
sadorowo Jun 14, 2024
28c9dba
adapt notes fragment to MD3
sadorowo Jun 14, 2024
2fd7038
add lock layout function (szkolny-eu/szkolny-android#199)
sadorowo Jun 14, 2024
a7c2362
hide classroom heading when no classroom is specified
sadorowo Jun 14, 2024
14cf35f
add support for grade column codes
sadorowo Jun 14, 2024
7ddc7b0
grades: join code and category together
sadorowo Jun 14, 2024
651ed02
add cosmetic ui changes + fix build issues
sadorowo Jun 14, 2024
1467239
fix proguard rules (attempt 1)
sadorowo Jun 14, 2024
536d0fa
add new Retrofit2 rules
sadorowo Jun 14, 2024
9e1ce93
add new ProGuard rules + fix QR scanning
sadorowo Jun 14, 2024
28a1020
fix agenda view crash when building release variant
sadorowo Jun 15, 2024
ff28177
improve LessonDetailsDialog
sadorowo Jun 15, 2024
336d237
remove duplicated string extension
sadorowo Jun 15, 2024
a0be544
set separate app ID & icon for debug version
sadorowo Jun 16, 2024
05a14bb
remove unneeded import statement
sadorowo Jun 16, 2024
126abff
fix collapsing toolbar title when doing back gesture
sadorowo Jun 16, 2024
8c4a78c
remove useless dependencies
sadorowo Jun 16, 2024
e99c2ef
fix UI issues on old Android versions
sadorowo Jun 17, 2024
f0fc208
fix missing color resources + cleanup dependencies
sadorowo Jun 17, 2024
9d760b5
fix release building issue
sadorowo Jun 17, 2024
9a3f4a2
fix release building issue & remove ripple from NavView
sadorowo Jun 17, 2024
13f1dca
move version badge to the top bar
sadorowo Jun 17, 2024
c8bc2ba
Revert changes introduced by rebase
kuba2k2 Jun 18, 2024
71cfdfa
Update NavLib from sadorowo/NavLib
kuba2k2 Jun 18, 2024
ac0cf8a
Revert "add lock layout function (szkolny-eu/szkolny-android#199)"
kuba2k2 Jun 18, 2024
1fe9eb7
Revert "add support for grade column codes"
kuba2k2 Jun 18, 2024
f1c578b
Revert unnecessary code changes, part 1
kuba2k2 Jun 18, 2024
e635b22
Lower minSdk to 19
kuba2k2 Jun 20, 2024
31e398d
Revert unnecessary code changes, part 2
kuba2k2 Jun 20, 2024
a5d193d
Add new application logo
kuba2k2 Jun 20, 2024
3bcaa0d
Restore bottom bar support in NavLib, revert unnecessary changes
kuba2k2 Jun 22, 2024
8a6ea4f
Use new IconicsMaterialButton in MessageFragment
kuba2k2 Jun 22, 2024
a0c9456
Migrate NavView to view binding
kuba2k2 Jun 22, 2024
e492878
Support IconButton in IconicsMaterialButton
kuba2k2 Jun 22, 2024
2b77049
Cleanup NavLib w600dp styles
kuba2k2 Jun 22, 2024
7893899
Remove NavLib text styles
kuba2k2 Jun 24, 2024
67d0375
Refactor all application themes, update styles in layouts
kuba2k2 Jun 26, 2024
942019c
Move enums and config entry to .data, fix app crashing
kuba2k2 Jun 26, 2024
3665517
Rename non-theme styles to AppStyle
kuba2k2 Jun 27, 2024
a7f20b7
Restructure app config classes, move config to .data
kuba2k2 Jun 27, 2024
5fdc05e
Add Theme enum and UiManager, support basic theme changing
kuba2k2 Jun 27, 2024
17fbecf
Actually support basic theme changing
kuba2k2 Jun 28, 2024
73c01a9
Serialize enum as string, fix config migration, bring back DebugDb
kuba2k2 Jun 28, 2024
135d6c9
Fix changing themes, apply night mode in App
kuba2k2 Jun 28, 2024
dd9812e
Fix resolving ColorStateList attributes, add LabPlaygroundFragment
kuba2k2 Jun 28, 2024
fcb7352
add Iconics methods into ProGuard rules
sadorowo Jun 28, 2024
423783e
Replace home card icon buttons, remove unused icons
kuba2k2 Jun 30, 2024
300ed82
Update gradle properties
kuba2k2 Jun 30, 2024
78e3056
Update build.gradle
kuba2k2 Jun 30, 2024
9cfd75b
Remove unnecessary dependencies
kuba2k2 Jun 30, 2024
88f066b
Remove playstore icon
kuba2k2 Jun 30, 2024
3b16984
Apply fixes after review
kuba2k2 Jun 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 19 additions & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/dictionaries/Kuba.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 54 additions & 25 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ apply from: 'git-info.gradle'
android {
compileSdkVersion setup.compileSdk

namespace "pl.szczodrzynski.edziennik"

defaultConfig {
applicationId 'pl.szczodrzynski.edziennik'
applicationId "pl.szczodrzynski.edziennik"
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk

Expand All @@ -20,8 +22,9 @@ android {

buildConfigField "java.util.Map<String, String>", "GIT_INFO", gitInfoMap
buildConfigField "String", "VERSION_BASE", "\"${release.versionName}\""

manifestPlaceholders = [
buildTimestamp: String.valueOf(System.currentTimeMillis())
buildTimestamp: String.valueOf(System.currentTimeMillis())
]

multiDexEnabled = true
Expand All @@ -36,46 +39,57 @@ android {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
}

correctErrorTypes = true
}
}

buildTypes {
debug {
getIsDefault().set(true)
minifyEnabled = false
applicationIdSuffix = ".debug"
manifestPlaceholders = [
buildTimestamp: 0
buildTimestamp: 0
]
}

release {
minifyEnabled = true
shrinkResources = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles fileTree('proguard').asList().toArray()
}
}
flavorDimensions "platform"

flavorDimensions += "platform"

productFlavors {
unofficial {
getIsDefault().set(true)
versionName "${release.versionName}-${gitInfo.versionSuffix}"
}

official {}
play {}
}

variantFilter { variant ->
def flavors = variant.flavors*.name
setIgnore(variant.buildType.name == "debug" && !flavors.contains("unofficial") || flavors.contains("main"))
}

sourceSets {
unofficial {
java.srcDirs = ["src/main/java", "src/play-not/java"]
manifest.srcFile("src/play-not/AndroidManifest.xml")
}

official {
java.srcDirs = ["src/main/java", "src/play-not/java"]
manifest.srcFile("src/play-not/AndroidManifest.xml")
}

play {
java.srcDirs = ["src/main/java", "src/play/java"]
}
Expand All @@ -84,29 +98,36 @@ android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}

buildFeatures {
dataBinding = true
viewBinding = true
buildConfig = true
}

compileOptions {
coreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "1.8"
}

packagingOptions {
resources {
excludes += ['META-INF/library-core_release.kotlin_module']
}
}

externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.10.2"
}
}

lint {
checkReleaseBuilds false
}
Expand All @@ -115,6 +136,7 @@ android {
tasks.whenTaskAdded { task ->
if (!task.name.endsWith("Release") && !task.name.endsWith("ReleaseWithR8"))
return

def renameTaskName = "rename${task.name.capitalize()}"

def flavor = ""
Expand All @@ -125,16 +147,20 @@ tasks.whenTaskAdded { task ->
if (task.name.startsWith("minify"))
flavor = task.name.substring("minify".length(), task.name.indexOf("Release")).uncapitalize()

def taskName = "package${flavor.capitalize()}Release"

if (flavor != "") {
tasks.create(renameTaskName, Copy) {
tasks.register(renameTaskName, Copy) {
dependsOn(taskName)
from file("${projectDir}/${flavor}/release/"),
file("${buildDir}/outputs/mapping/${flavor}Release/"),
file("${buildDir}/outputs/apk/${flavor}/release/"),
file("${buildDir}/outputs/bundle/${flavor}Release/")
file("${layout.buildDirectory}/outputs/mapping/${flavor}Release/"),
file("${layout.buildDirectory}/outputs/apk/${flavor}/release/"),
file("${layout.buildDirectory}/outputs/bundle/${flavor}Release/")
include "*.aab", "*.apk", "mapping.txt", "output-metadata.json"
destinationDir file("${projectDir}/release/")
rename ".+?\\.(.+)", "Edziennik_${android.defaultConfig.versionName}_${flavor}." + '$1'
}

task.finalizedBy(renameTaskName)
}
}
Expand All @@ -145,37 +171,37 @@ dependencies {
// Language cores
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.multidex:multidex:2.0.1"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.4"

// Android Jetpack
implementation "androidx.appcompat:appcompat:1.5.1"
implementation "androidx.appcompat:appcompat:1.7.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.core:core-ktx:1.9.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
implementation "androidx.navigation:navigation-fragment-ktx:2.5.2"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.room:room-runtime:2.4.3"
implementation "androidx.room:room-ktx:2.4.3"
implementation "androidx.work:work-runtime-ktx:2.7.1"
kapt "androidx.room:room-compiler:2.4.3"
implementation "androidx.core:core-ktx:1.13.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.8.2"
implementation "androidx.navigation:navigation-fragment-ktx:2.7.7"
implementation "androidx.recyclerview:recyclerview:1.3.2"
implementation "androidx.room:room-runtime:2.6.1"
implementation "androidx.room:room-ktx:2.6.1"
implementation "androidx.work:work-runtime-ktx:2.9.0"
kapt "androidx.room:room-compiler:2.6.1"

// Google design libs
implementation "com.google.android.material:material:1.6.1"
implementation "com.google.android.material:material:1.12.0"
implementation "com.google.android.flexbox:flexbox:3.0.0"

// Play Services/Firebase
implementation "com.google.android.gms:play-services-wearable:17.1.0"
implementation "com.google.android.gms:play-services-wearable:18.2.0"
implementation("com.google.firebase:firebase-core") { version { strictly "19.0.2" } }
implementation "com.google.firebase:firebase-crashlytics:18.2.13"
implementation "com.google.firebase:firebase-crashlytics:19.0.1"
implementation("com.google.firebase:firebase-messaging") { version { strictly "20.1.3" } }

// OkHttp, Retrofit, Gson, Jsoup
implementation("com.squareup.okhttp3:okhttp") { version { strictly "3.12.13" } }
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.retrofit2:converter-scalars:2.9.0"
implementation 'com.google.code.gson:gson:2.8.8'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'org.jsoup:jsoup:1.14.3'
implementation "pl.droidsonroids:jspoon:1.3.2"
implementation "pl.droidsonroids.retrofit2:converter-jspoon:1.3.2"
Expand All @@ -189,19 +215,22 @@ dependencies {
implementation "eu.szkolny:material-about-library:1d5ebaf47c"
implementation "eu.szkolny:mhttp:af4b62e6e9"
implementation "eu.szkolny:nachos:0e5dfcaceb"
implementation "eu.szkolny.selective-dao:annotation:27f8f3f194"
implementation "eu.szkolny.selective-dao:annotation:6a337f9"
officialImplementation "eu.szkolny:ssl-provider:1.0.0"
unofficialImplementation "eu.szkolny:ssl-provider:1.0.0"

implementation "pl.szczodrzynski:numberslidingpicker:2921225f76"
implementation "pl.szczodrzynski:recyclertablayout:700f980584"
implementation "pl.szczodrzynski:tachyon:551943a6b5"
kapt "eu.szkolny.selective-dao:codegen:27f8f3f194"
kapt "eu.szkolny.selective-dao:codegen:6a337f9"

// Iconics & related
implementation "com.mikepenz:iconics-core:5.3.2"
implementation "com.mikepenz:iconics-views:5.3.2"
implementation "com.mikepenz:materialdrawer:9.0.1"
implementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar"
implementation "eu.szkolny:szkolny-font:77e33acc2a"
implementation 'com.mikepenz:google-material-typeface:4.0.0.2-kotlin@aar'
implementation "eu.szkolny:szkolny-font:95eabe7"

// Other dependencies
implementation "cat.ereza:customactivityoncrash:2.3.0"
Expand Down
2 changes: 1 addition & 1 deletion app/git-info.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "org.eclipse.jgit:org.eclipse.jgit:5.5.+"
Expand Down
31 changes: 31 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,37 @@
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:640759989760:android:4aa71407b25cdc8d",
"android_client_info": {
"package_name": "pl.szczodrzynski.edziennik.debug"
}
},
"oauth_client": [
{
"client_id": "640759989760-6f8q00u864lnuh3gh36e8g4cer9lv8pv.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAvq9HMPxulz9ntdAHZ0eZuPf2YQs4nDSU"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
Expand Down
Loading