Apply FlatShadowNode padding to View

Summary: Any padding that a FlatShadowNode is assigned by React runtime should be translated to a backing Android View so it looks correct and lays out children accordingly.

Reviewed By: sriramramani

Differential Revision: D2756562
This commit is contained in:
Denis Koroskin
2015-12-15 22:09:17 -08:00
committed by Ahmed El-Helw
parent dbe9cc333c
commit 312f04d2b7
4 changed files with 86 additions and 1 deletions

View File

@@ -113,6 +113,15 @@ import com.facebook.react.uimanager.ViewManagerRegistry;
}
}
/* package */ void setPadding(
int reactTag,
int paddingLeft,
int paddingTop,
int paddingRight,
int paddingBottom) {
resolveView(reactTag).setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
}
/* package */ void detachAllChildrenFromViews(int[] viewsToDetachAllChildrenFrom) {
for (int viewTag : viewsToDetachAllChildrenFrom) {
View view = resolveView(viewTag);