Use int as a type for 'active' prop to make it animatable on Android

This commit is contained in:
Krzysztof Magiera
2018-08-13 19:35:21 +02:00
parent b220432322
commit d6ae2caea8
3 changed files with 5 additions and 5 deletions

View File

@@ -20,8 +20,8 @@ public class ScreenViewManager extends ViewGroupManager<Screen> {
return new Screen(reactContext);
}
@ReactProp(name = "active", defaultBoolean = false)
public void setActive(Screen view, boolean active) {
view.setActive(active);
@ReactProp(name = "active", defaultInt = 0)
public void setActive(Screen view, int active) {
view.setActive(active != 0);
}
}