Allow setting elevation on any type of View

Summary:
Moved setElevation from ReactViewManager to BaseViewManager. This allows
setting elevation on any type of view such as Toolbar for exemple.
Closes https://github.com/facebook/react-native/pull/5292

Reviewed By: svcscm

Differential Revision: D2837415

Pulled By: androidtrunkagent

fb-gh-sync-id: a5aa7abd95b99303d312cd9c2414539335540925
This commit is contained in:
Janic Duplessis
2016-01-16 02:32:39 -08:00
committed by facebook-github-bot-7
parent c9f274c02d
commit 5ac848cd7f
2 changed files with 9 additions and 8 deletions

View File

@@ -61,14 +61,6 @@ public class ReactViewManager extends ViewGroupManager<ReactViewGroup> {
view.setBorderStyle(borderStyle);
}
@ReactProp(name = "elevation")
public void setElevation(ReactViewGroup view, float elevation) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
view.setElevation(PixelUtil.toPixelFromDIP(elevation));
}
// Do nothing on API < 21
}
@ReactProp(name = "pointerEvents")
public void setPointerEvents(ReactViewGroup view, @Nullable String pointerEventsStr) {
if (pointerEventsStr != null) {