forked from github/szkolny
fix UI issues on old Android versions
This commit is contained in:
parent
1e6016c446
commit
661f0912cb
@ -167,6 +167,10 @@ tasks.whenTaskAdded { task ->
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
|
||||
implementation files('libs/navlib-debug.aar')
|
||||
implementation files('libs/navlib-font-debug.aar')
|
||||
|
||||
// Language cores
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "androidx.multidex:multidex:2.0.1"
|
||||
@ -206,7 +210,7 @@ dependencies {
|
||||
implementation "pl.droidsonroids.retrofit2:converter-jspoon:1.3.2"
|
||||
|
||||
// Szkolny.eu libraries/forks
|
||||
implementation "com.github.santoni0:NavLib:323288f"
|
||||
//implementation "com.github.santoni0:NavLib:323288f"
|
||||
implementation "eu.szkolny:android-snowfall:1ca9ea2da3"
|
||||
implementation "eu.szkolny:agendacalendarview:1.0.4"
|
||||
implementation "eu.szkolny:cafebar:5bf0c618de"
|
||||
@ -226,11 +230,13 @@ dependencies {
|
||||
// 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 'com.mikepenz:google-material-typeface:4.0.0.2-kotlin@aar'
|
||||
implementation "eu.szkolny:szkolny-font:77e33acc2a"
|
||||
|
||||
// Other dependencies
|
||||
debugApi "com.mikepenz:materialize:1.2.1" // required for all R.color.md_* colors
|
||||
implementation "cat.ereza:customactivityoncrash:2.3.0"
|
||||
implementation "com.android.volley:volley:1.2.1"
|
||||
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
||||
@ -253,5 +259,30 @@ dependencies {
|
||||
implementation("com.heinrichreimersoftware:material-intro") { version { strictly "1.5.8" } }
|
||||
implementation("pl.droidsonroids.gif:android-gif-drawable") { version { strictly "1.2.15" } }
|
||||
|
||||
// Debug-only dependencies
|
||||
debugImplementation "com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:v1.0.6"
|
||||
|
||||
// NavLib required dependencies
|
||||
debugImplementation "com.mikepenz:iconics-views:5.3.2"
|
||||
debugImplementation "com.mikepenz:iconics-typeface-api:5.3.2"
|
||||
debugImplementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar"
|
||||
debugImplementation "com.balysv:material-ripple:1.0.2"
|
||||
debugApi "com.mikepenz:materialize:1.2.1"
|
||||
debugApi "com.mikepenz:materialdrawer:9.0.1"
|
||||
debugApi "com.mikepenz:iconics-core:5.3.2"
|
||||
debugApi "com.mikepenz:itemanimators:1.1.0"
|
||||
|
||||
// agendacalendarview required dependencies
|
||||
|
||||
debugApi 'eu.szkolny:StickyListHeaders:2.7.1'
|
||||
debugImplementation 'io.reactivex:rxjava:1.1.1'
|
||||
|
||||
// material-about-library required dependencies
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0-alpha04', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
|
||||
debugImplementation 'net.yslibrary.licenseadapter:licenseadapter:3.0.0'
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
}
|
||||
|
@ -142,8 +142,6 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
|
||||
setContentView(b.root)
|
||||
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
|
||||
mainSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
||||
errorSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
||||
|
||||
@ -159,38 +157,6 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
b.navView.apply {
|
||||
drawer.init(this@MainActivity)
|
||||
|
||||
/*
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) {
|
||||
SystemBarsUtil(this@MainActivity).run {
|
||||
//paddingByKeyboard = b.navView
|
||||
appFullscreen = false
|
||||
statusBarColor = getColorFromAttr(context, android.R.attr.colorBackground)
|
||||
statusBarDarker = false
|
||||
statusBarFallbackLight = COLOR_HALF_TRANSPARENT
|
||||
statusBarFallbackGradient = COLOR_HALF_TRANSPARENT
|
||||
navigationBarTransparent = false
|
||||
|
||||
b.navView.configSystemBarsUtil(this)
|
||||
|
||||
// fix for setting status bar color to window color, outside of navlib
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.statusBarColor = statusBarColor
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
|
||||
&& ColorUtils.calculateLuminance(statusBarColor) > 0.6
|
||||
) {
|
||||
@Suppress("deprecation")
|
||||
window.decorView.systemUiVisibility =
|
||||
window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
||||
}
|
||||
|
||||
// TODO fix navlib navbar detection, orientation change issues, status bar color setting if not fullscreen
|
||||
|
||||
commit()
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
bottomBar.apply {
|
||||
fabEnable = false
|
||||
fabExtendable = true
|
||||
@ -974,7 +940,8 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
navView.bottomBar.fabEnable = false
|
||||
navView.bottomBar.fabExtended = false
|
||||
navView.bottomBar.setFabOnClickListener(null)
|
||||
navView.toolbarLayout.setTitle((navTarget.titleRes ?: navTarget.nameRes).resolveString(applicationContext))
|
||||
|
||||
navView.toolbar.setTitle(navTarget.titleRes ?: navTarget.nameRes)
|
||||
|
||||
d("NavDebug", "Navigating from ${this.navTarget.name} to ${navTarget.name}")
|
||||
|
||||
|
@ -144,7 +144,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/material_drawer_account_header_small_third_badge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="4dp"
|
||||
android:fontFamily="sans-serif"
|
||||
|
@ -20,6 +20,7 @@ buildscript {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.5.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
Loading…
Reference in New Issue
Block a user