react-native-segmented-android icon indicating copy to clipboard operation
react-native-segmented-android copied to clipboard

Fix 0.25 deprecations (and 0.26 errors). Fix the iOS warning. Fix logic bugs due properties being set in nondeterminstic orders.

Open mikelambert opened this issue 8 years ago • 5 comments

mikelambert avatar May 24 '16 19:05 mikelambert

Added another change to this, and updating the title to reflect it. Bugs were:

  • If RN calls setSelectedChild before setChildText, it will trigger an array-out-of-bounds index since no children exist.
  • If RN calls setTintColor before setChildText, it will updated the colors of zero views, and then the constructed views won't have the correct color.
  • If RN calls orientation before setChildText, the objects will be set up with incorrect layout constraints
  • If RN detects a change to childText and calls setChildText multiple times, it will result in too many children.

This third changelist fixes all of those issues.

mikelambert avatar May 27 '16 01:05 mikelambert

Ping?

mikelambert avatar Sep 20 '16 17:09 mikelambert

@mikelambert When running your fork, I've got

/Users/user/verb/node_modules/react-native-segmented-android/src/main/java/com/higo/zhangyp/segmented/AndroidSegmentedEvent.java:19: error: no suitable constructor found for Event(int)
        super(viewId);
        ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int,long) is not applicable
      (actual and formal argument lists differ in length)
1 error
:react-native-segmented-android:compileReleaseJavaWithJavac FAILED

nakaruna avatar Oct 14 '16 00:10 nakaruna

What version of RN are you using? RN changed their API for Event constructors as of 0.32 (due to the breaking change for android listed in https://github.com/facebook/react-native/releases/tag/v0.32.0), and this pull request now (with https://github.com/zzyyppqq/react-native-segmented-android/pull/8/commits/1a8c1ef678be9c639966e022be04c3a99f82cbf8) fixes that for react-native-segmented-android as well. So this change is only compatible with 0.32 and up.

mikelambert avatar Oct 14 '16 01:10 mikelambert

Hi @mikelambert

You right. I'll update my project and let you know

nakaruna avatar Oct 14 '16 07:10 nakaruna