Skip to content

Commit

Permalink
Revert "feat(android): add nestedScrollPriority for ListView and …
Browse files Browse the repository at this point in the history
…`ScrollView` (Tencent#2744)"

This reverts commit 2644658.
  • Loading branch information
zoomchan-cxj committed Dec 7, 2022
1 parent 2644658 commit b3e61e5
Show file tree
Hide file tree
Showing 24 changed files with 264 additions and 1,852 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
import com.tencent.mtt.hippy.utils.LogUtils;
import com.tencent.mtt.hippy.utils.PixelUtil;
import com.tencent.mtt.hippy.views.common.CommonBorder;
import com.tencent.mtt.hippy.views.common.HippyNestedScrollComponent;
import com.tencent.mtt.hippy.views.common.HippyNestedScrollHelper;
import com.tencent.mtt.hippy.views.hippylist.HippyRecyclerViewWrapper;
import com.tencent.mtt.hippy.views.list.HippyListView;
import com.tencent.mtt.hippy.views.scroll.HippyScrollView;
Expand Down Expand Up @@ -642,52 +640,6 @@ public void setRenderToHardwareTexture(T view, boolean useHWTexture) {
view.setLayerType(useHWTexture ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE, null);
}

@HippyControllerProps(name = HippyNestedScrollComponent.PROP_PRIORITY, defaultType =
HippyControllerProps.STRING, defaultString = HippyNestedScrollComponent.PRIORITY_SELF)
public void setNestedScrollPriority(T view, String priorityName) {
if (view instanceof HippyNestedScrollComponent) {
HippyNestedScrollComponent sc = (HippyNestedScrollComponent) view;
HippyNestedScrollComponent.Priority priority = HippyNestedScrollHelper.priorityOf(priorityName);
sc.setNestedScrollPriority(HippyNestedScrollComponent.DIRECTION_ALL, priority);
}
}

@HippyControllerProps(name = HippyNestedScrollComponent.PROP_LEFT_PRIORITY, defaultType =
HippyControllerProps.STRING, defaultString = HippyNestedScrollComponent.PRIORITY_SELF)
public void setNestedScrollLeftPriority(T view, String priorityName) {
if (view instanceof HippyNestedScrollComponent) {
HippyNestedScrollComponent.Priority priority = HippyNestedScrollHelper.priorityOf(priorityName);
((HippyNestedScrollComponent) view).setNestedScrollPriority(HippyNestedScrollComponent.DIRECTION_LEFT, priority);
}
}

@HippyControllerProps(name = HippyNestedScrollComponent.PROP_TOP_PRIORITY, defaultType =
HippyControllerProps.STRING, defaultString = HippyNestedScrollComponent.PRIORITY_SELF)
public void setNestedScrollTopPriority(T view, String priorityName) {
if (view instanceof HippyNestedScrollComponent) {
HippyNestedScrollComponent.Priority priority = HippyNestedScrollHelper.priorityOf(priorityName);
((HippyNestedScrollComponent) view).setNestedScrollPriority(HippyNestedScrollComponent.DIRECTION_TOP, priority);
}
}

@HippyControllerProps(name = HippyNestedScrollComponent.PROP_RIGHT_PRIORITY, defaultType =
HippyControllerProps.STRING, defaultString = HippyNestedScrollComponent.PRIORITY_SELF)
public void setNestedScrollRightPriority(T view, String priorityName) {
if (view instanceof HippyNestedScrollComponent) {
HippyNestedScrollComponent.Priority priority = HippyNestedScrollHelper.priorityOf(priorityName);
((HippyNestedScrollComponent) view).setNestedScrollPriority(HippyNestedScrollComponent.DIRECTION_RIGHT, priority);
}
}

@HippyControllerProps(name = HippyNestedScrollComponent.PROP_BOTTOM_PRIORITY, defaultType =
HippyControllerProps.STRING, defaultString = HippyNestedScrollComponent.PRIORITY_SELF)
public void setNestedScrollBottomPriority(T view, String priorityName) {
if (view instanceof HippyNestedScrollComponent) {
HippyNestedScrollComponent.Priority priority = HippyNestedScrollHelper.priorityOf(priorityName);
((HippyNestedScrollComponent) view).setNestedScrollPriority(HippyNestedScrollComponent.DIRECTION_BOTTOM, priority);
}
}

@SuppressWarnings("EmptyMethod")
@HippyControllerProps(name = NodeProps.CUSTOM_PROP)
public void setCustomProp(T view, String methodName, Object props) {
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit b3e61e5

Please sign in to comment.