react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

Library has compilation issues with Android 13 #7545

Open ankitsingh08 opened this issue 1 year ago • 3 comments

Fix for compilation issues with the lib on Android 13 Issue #7545

ankitsingh08 avatar Jul 11 '22 09:07 ankitsingh08

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 16 '22 01:09 stale[bot]

What needs to happen to get this merged?

svenlombaert avatar Sep 19 '22 14:09 svenlombaert

I second @svenlombaert , why is this waiting ?

julestruong avatar Sep 19 '22 14:09 julestruong

I think this need to be merged

mohamed2m2018 avatar Sep 29 '22 16:09 mohamed2m2018

I agree!

ninjz avatar Oct 05 '22 07:10 ninjz

For those who could not wait, i used a patch using https://www.npmjs.com/package/patch-package

diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
index 78fb25d..7fd4637 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
@@ -74,7 +74,7 @@ open class ButtonPresenter(private val context: Context, private val button: But
     private fun applyAccessibilityLabel(menuItem: MenuItem) {
         if (button.accessibilityLabel.hasValue()) {
             if (button.component.hasValue()) {
-                menuItem.actionView.contentDescription = button.accessibilityLabel.get()
+                menuItem.actionView?.contentDescription = button.accessibilityLabel.get()
             } else {
                 MenuItemCompat.setContentDescription(menuItem, button.accessibilityLabel.get())
             }
diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt
index 8d6c256..c30fcad 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt
@@ -43,17 +43,17 @@ open class BaseViewAnimator<T : View>(
     private inner class AnimatorListener(private val startState: AnimationState, private val endVisibility: Int) : AnimatorListenerAdapter() {
         var isCancelled = false
 
-        override fun onAnimationStart(animation: Animator?) {
+        override fun onAnimationStart(animation: Animator) {
             view.resetViewProperties()
             view.visibility = View.VISIBLE
             animationState = startState
         }
 
-        override fun onAnimationCancel(animation: Animator?) {
+        override fun onAnimationCancel(animation: Animator) {
             isCancelled = true
         }
 
-        override fun onAnimationEnd(animation: Animator?) {
+        override fun onAnimationEnd(animation: Animator) {
             if (!isCancelled) {
                 animationState = AnimationState.Idle
                 view.visibility = endVisibility
diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt
index a469d4c..e3f606a 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt
@@ -68,7 +68,7 @@ class IconBackgroundDrawable(
         super.setBounds(r)
     }
 
-    override fun onBoundsChange(bounds: Rect?) {
+    override fun onBoundsChange(bounds: Rect) {
         if (bounds != null) {
             backgroundRect = Rect((bounds.width() - backgroundWidth) / 2,
                     (bounds.height() - backgroundHeight) / 2,

julestruong avatar Oct 05 '22 08:10 julestruong

Hi, is this PR ever going to be merged ?

sam-houle1 avatar Oct 24 '22 17:10 sam-houle1

any update on this?

agestaun avatar Oct 26 '22 07:10 agestaun

Any update on this PR?

gabpaet avatar Nov 03 '22 03:11 gabpaet

This issue still happening in 7.30.0 too, This PR needs to be merged

manohar-octifi avatar Nov 03 '22 14:11 manohar-octifi

Any updates on this?

mohamed2m2018 avatar Nov 03 '22 14:11 mohamed2m2018

Releasing a fix with this PR today

yogevbd avatar Nov 07 '22 09:11 yogevbd