Created
August 1, 2018 11:11
-
-
Save GaborWnuk/e74095bca909a97bf6e1eae6bd347058 to your computer and use it in GitHub Desktop.
FancyViewManager.kt for React Native project based on Kotlin
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
package pl.wp.wdi | |
import android.graphics.Color; | |
import android.view.View | |
import com.facebook.react.uimanager.SimpleViewManager | |
import com.facebook.react.uimanager.ThemedReactContext | |
class FancyViewManager: SimpleViewManager<View>() { | |
override fun getName(): String { | |
return "FancyViewManager" | |
} | |
override fun createViewInstance(reactContext: ThemedReactContext?): View { | |
var view = View(reactContext); | |
view.setBackgroundColor(Color.MAGENTA); | |
return view | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment