make use of rctshadowview
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
package com.uitextview
|
||||
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import com.facebook.react.uimanager.SimpleViewManager
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.annotations.ReactProp
|
||||
|
||||
class UiTextViewViewManager : SimpleViewManager<View>() {
|
||||
override fun getName() = "UiTextViewView"
|
||||
|
||||
override fun createViewInstance(reactContext: ThemedReactContext): View {
|
||||
return View(reactContext)
|
||||
}
|
||||
|
||||
@ReactProp(name = "color")
|
||||
fun setColor(view: View, color: String) {
|
||||
view.setBackgroundColor(Color.parseColor(color))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user