mirror of
https://github.com/MatomoCamp/matomocamp-companion-android.git
synced 2024-09-19 16:13:46 +02:00
Enable non-transitive R class, allowing further optimizations
This commit is contained in:
parent
ba842f9606
commit
eecb37186a
8 changed files with 8 additions and 11 deletions
|
@ -26,7 +26,6 @@
|
|||
<activity
|
||||
android:name=".activities.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.TranslucentStatusBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -98,8 +98,8 @@ class EventDetailsActivity : AppCompatActivity(R.layout.single_event), CreateNfc
|
|||
private fun initEvent(event: Event) {
|
||||
// Enable up navigation only after getting the event details
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar).apply {
|
||||
setNavigationIcon(R.drawable.abc_ic_ab_back_material)
|
||||
setNavigationContentDescription(R.string.abc_action_bar_up_description)
|
||||
setNavigationIcon(androidx.appcompat.R.drawable.abc_ic_ab_back_material)
|
||||
setNavigationContentDescription(androidx.appcompat.R.string.abc_action_bar_up_description)
|
||||
setNavigationOnClickListener { onSupportNavigateUp() }
|
||||
title = event.track.name
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ class MainActivity : AppCompatActivity(R.layout.main), CreateNfcAppDataCallback
|
|||
private fun updateActionBar(section: Section, menuItem: MenuItem) {
|
||||
title = menuItem.title
|
||||
ViewCompat.setTranslationZ(holder.contentView,
|
||||
if (section.extendsAppBar) resources.getDimension(R.dimen.design_appbar_elevation) else 0f)
|
||||
if (section.extendsAppBar) resources.getDimension(com.google.android.material.R.dimen.design_appbar_elevation) else 0f)
|
||||
}
|
||||
|
||||
override fun onPostCreate(savedInstanceState: Bundle?) {
|
||||
|
|
|
@ -64,8 +64,8 @@ class TrackScheduleEventActivity : AppCompatActivity(R.layout.track_schedule_eve
|
|||
} else -1L
|
||||
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar).apply {
|
||||
setNavigationIcon(R.drawable.abc_ic_ab_back_material)
|
||||
setNavigationContentDescription(R.string.abc_action_bar_up_description)
|
||||
setNavigationIcon(androidx.appcompat.R.drawable.abc_ic_ab_back_material)
|
||||
setNavigationContentDescription(androidx.appcompat.R.string.abc_action_bar_up_description)
|
||||
setNavigationOnClickListener { onSupportNavigateUp() }
|
||||
title = track.toString()
|
||||
subtitle = day.toString()
|
||||
|
|
|
@ -7,7 +7,6 @@ import androidx.appcompat.app.AppCompatDelegate
|
|||
import androidx.browser.customtabs.CustomTabColorSchemeParams
|
||||
import androidx.browser.customtabs.CustomTabsIntent
|
||||
import androidx.core.content.ContextCompat
|
||||
import be.digitalia.fosdem.R
|
||||
|
||||
@SuppressLint("PrivateResource")
|
||||
fun CustomTabsIntent.Builder.configureToolbarColors(context: Context,
|
||||
|
@ -16,7 +15,7 @@ fun CustomTabsIntent.Builder.configureToolbarColors(context: Context,
|
|||
.setToolbarColor(ContextCompat.getColor(context, toolbarColorResId))
|
||||
.build()
|
||||
val darkColorSchemeParams = CustomTabColorSchemeParams.Builder()
|
||||
.setToolbarColor(ContextCompat.getColor(context, R.color.design_dark_default_color_surface))
|
||||
.setToolbarColor(ContextCompat.getColor(context, com.google.android.material.R.color.design_dark_default_color_surface))
|
||||
.build()
|
||||
|
||||
// Request the browser tab to follow the app theme setting
|
||||
|
|
|
@ -2,7 +2,6 @@ package be.digitalia.fosdem.utils
|
|||
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import be.digitalia.fosdem.settings.UserSettingsProvider
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
|
|
@ -14,7 +14,6 @@ import android.view.Window
|
|||
import android.widget.ImageView
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import be.digitalia.fosdem.R
|
||||
|
||||
var Window.statusBarColorCompat: Int
|
||||
@ColorInt
|
||||
|
@ -49,7 +48,7 @@ fun View.tintBackground(backgroundColor: ColorStateList?) {
|
|||
val Context.isLightTheme: Boolean
|
||||
get() {
|
||||
val value = TypedValue()
|
||||
return theme.resolveAttribute(R.attr.isLightTheme, value, true) && value.data != 0
|
||||
return theme.resolveAttribute(androidx.appcompat.R.attr.isLightTheme, value, true) && value.data != 0
|
||||
}
|
||||
|
||||
fun ImageView.invertImageColors() {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
android.useAndroidX=true
|
||||
android.nonTransitiveRClass=true
|
||||
android.enableR8.fullMode=true
|
||||
org.gradle.jvmargs=-Xmx2048m
|
||||
|
||||
|
|
Loading…
Reference in a new issue