-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: FlashList Fabric Android support
- Loading branch information
Marek Fořt
committed
Apr 26, 2022
1 parent
14b344d
commit 1a8fc9f
Showing
4 changed files
with
65 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
android/src/fabric/java/com/shopify/reactnative/flash_list/FlashListComponentsRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.shopify.reactnative.flash_list.react; | ||
|
||
import com.facebook.jni.HybridData; | ||
import com.facebook.proguard.annotations.DoNotStrip; | ||
import com.facebook.react.fabric.ComponentFactory; | ||
import com.facebook.soloader.SoLoader; | ||
|
||
@DoNotStrip | ||
public class FlashListComponentsRegistry { | ||
static { | ||
SoLoader.loadLibrary("fabricjni"); | ||
SoLoader.loadLibrary("flashlist_modules"); | ||
} | ||
|
||
@DoNotStrip private final HybridData mHybridData; | ||
|
||
@DoNotStrip | ||
private native HybridData initHybrid(ComponentFactory componentFactory); | ||
|
||
@DoNotStrip | ||
private FlashListComponentsRegistry(ComponentFactory componentFactory) { | ||
mHybridData = initHybrid(componentFactory); | ||
} | ||
|
||
@DoNotStrip | ||
public static FlashListComponentsRegistry register(ComponentFactory componentFactory) { | ||
return new FlashListComponentsRegistry(componentFactory); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters