mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-10 09:29:39 +08:00
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:
committed by
facebook-github-bot-7
parent
c9f274c02d
commit
5ac848cd7f
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user