Skip to content

Commit

Permalink
nonTransitiveRClass
Browse files Browse the repository at this point in the history
  • Loading branch information
yueeng committed Aug 20, 2023
1 parent 6d95f33 commit ff95158
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ open class MoeActivity(contentLayoutId: Int) : AppCompatActivity(contentLayoutId
findViewById<View>(android.R.id.content).transitionName = "shared_element_container"
setEnterSharedElementCallback(MaterialContainerTransformSharedElementCallback())
setExitSharedElementCallback(MaterialContainerTransformSharedElementCallback())
val background = theme.obtainStyledAttributes(intArrayOf(R.attr.colorSurface)).use {
val background = theme.obtainStyledAttributes(intArrayOf(com.google.android.material.R.attr.colorSurface)).use {
it.getColor(0, Color.WHITE)
}
window.sharedElementEnterTransition = MaterialContainerTransform().apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class PreviewFragment : Fragment(), SavedFragment.Queryable {
var anim: ObjectAnimator? = null
fun trans(to: Int) {
val from = (binding.root.background as? ColorDrawable)?.color ?: 0
val target = if (to != 0) to else requireActivity().theme.obtainStyledAttributes(intArrayOf(R.attr.colorSurface)).use {
val target = if (to != 0) to else requireActivity().theme.obtainStyledAttributes(intArrayOf(com.google.android.material.R.attr.colorSurface)).use {
it.getColor(0, Color.WHITE)
}
anim = ObjectAnimator.ofObject(binding.root, "backgroundColor", ArgbEvaluator(), from, target).apply {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ android.enableJetifier=true
kotlin.code.style=official
org.gradle.unsafe.configuration-cache=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonTransitiveRClass=true
android.nonFinalResIds=false

0 comments on commit ff95158

Please sign in to comment.