mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Format Java code in xplat/js/react-native-github
Summary: This diff formats the Java class files inside xplat/js/react-native-github. Since google-java-format was enabled in D16071401 we want to codemode the existing code so that users don't have to deal with formatter lint noise at diff-time. ```arc f --paths-cmd 'hg files -I "**/*.java"'``` drop-conflicts Reviewed By: cpojer Differential Revision: D16071725 fbshipit-source-id: fc6e3852e45742c109f0c5ac4065d64201c74204
This commit is contained in:
1 parent
61e95e5cbf
commit
6c0f73b322
681 files changed
+14082
-16365
No files matched your search
@@ -1,10 +1,9 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||
* directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.uimanager;
|
||||
|
||||
import android.view.View;
|
||||
@@ -13,12 +12,9 @@ import java.util.List;
|
||||
import java.util.WeakHashMap;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Class providing children management API for view managers of classes extending ViewGroup.
|
||||
*/
|
||||
public abstract class ViewGroupManager <T extends ViewGroup>
|
||||
extends BaseViewManager<T, LayoutShadowNode>
|
||||
implements IViewManagerWithChildren {
|
||||
/** Class providing children management API for view managers of classes extending ViewGroup. */
|
||||
public abstract class ViewGroupManager<T extends ViewGroup>
|
||||
extends BaseViewManager<T, LayoutShadowNode> implements IViewManagerWithChildren {
|
||||
|
||||
private static WeakHashMap<View, Integer> mZIndexHash = new WeakHashMap<>();
|
||||
|
||||
@@ -33,16 +29,15 @@ public abstract class ViewGroupManager <T extends ViewGroup>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExtraData(T root, Object extraData) {
|
||||
}
|
||||
public void updateExtraData(T root, Object extraData) {}
|
||||
|
||||
public void addView(T parent, View child, int index) {
|
||||
parent.addView(child, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for batching a set of addView calls
|
||||
* Note that this adds the views to the beginning of the ViewGroup
|
||||
* Convenience method for batching a set of addView calls Note that this adds the views to the
|
||||
* beginning of the ViewGroup
|
||||
*
|
||||
* @param parent the parent ViewGroup
|
||||
* @param views the set of views to add
|
||||
@@ -89,14 +84,12 @@ public abstract class ViewGroupManager <T extends ViewGroup>
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether this View type needs to handle laying out its own children instead of
|
||||
* deferring to the standard css-layout algorithm.
|
||||
* Returns true for the layout to *not* be automatically invoked. Instead onLayout will be
|
||||
* invoked as normal and it is the View instance's responsibility to properly call layout on its
|
||||
* children.
|
||||
* Returns false for the default behavior of automatically laying out children without going
|
||||
* through the ViewGroup's onLayout method. In that case, onLayout for this View type must *not*
|
||||
* call layout on its children.
|
||||
* Returns whether this View type needs to handle laying out its own children instead of deferring
|
||||
* to the standard css-layout algorithm. Returns true for the layout to *not* be automatically
|
||||
* invoked. Instead onLayout will be invoked as normal and it is the View instance's
|
||||
* responsibility to properly call layout on its children. Returns false for the default behavior
|
||||
* of automatically laying out children without going through the ViewGroup's onLayout method. In
|
||||
* that case, onLayout for this View type must *not* call layout on its children.
|
||||
*/
|
||||
@Override
|
||||
public boolean needsCustomLayoutForChildren() {
|
||||
@@ -106,8 +99,8 @@ public abstract class ViewGroupManager <T extends ViewGroup>
|
||||
/**
|
||||
* Returns whether or not this View type should promote its grandchildren as Views. This is an
|
||||
* optimization for Scrollable containers when using Nodes, where instead of having one ViewGroup
|
||||
* containing a large number of draw commands (and thus being more expensive in the case of
|
||||
* an invalidate or re-draw), we split them up into several draw commands.
|
||||
* containing a large number of draw commands (and thus being more expensive in the case of an
|
||||
* invalidate or re-draw), we split them up into several draw commands.
|
||||
*/
|
||||
public boolean shouldPromoteGrandchildren() {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user