Android: enable foreground ripple

Reviewed By: astreet

Differential Revision: D3932066

fbshipit-source-id: ee2f019cb9ba41e32cbbd8c1cd07c9ed5263fddc
This commit is contained in:
Felix Oghina
2016-10-03 04:27:16 -07:00
committed by Facebook Github Bot
parent 8915507244
commit 6d175f2c25
3 changed files with 38 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ import javax.annotation.Nullable;
import java.util.Locale;
import java.util.Map;
import android.annotation.TargetApi;
import android.graphics.Rect;
import android.os.Build;
import android.view.View;
@@ -101,6 +102,14 @@ public class ReactViewManager extends ViewGroupManager<ReactViewGroup> {
null : ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), bg));
}
@TargetApi(Build.VERSION_CODES.M)
@ReactProp(name = "nativeForegroundAndroid")
public void setNativeForeground(ReactViewGroup view, @Nullable ReadableMap fg) {
view.setForeground(fg == null
? null
: ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), fg));
}
@ReactProp(name = com.facebook.react.uimanager.ReactClippingViewGroupHelper.PROP_REMOVE_CLIPPED_SUBVIEWS)
public void setRemoveClippedSubviews(ReactViewGroup view, boolean removeClippedSubviews) {
view.setRemoveClippedSubviews(removeClippedSubviews);