Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

* [Android] Fix that moveElement doesn't work when parent is not a list #805

Merged
merged 1 commit into from
Oct 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@ public void executeRender(RenderActionContext context) {
WXVContainer oldParent = component.getParent();
oldParent.remove(component,false);
((WXVContainer) newParent).addChild(component, mNewIndex);
if(!component.isVirtualComponent()){
((WXVContainer) newParent).addSubView(component.getHostView(), mNewIndex);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private boolean shouldReport(int x, int y) {
* Intercept refresh view and loading view
*/
@Override
protected void addSubView(View child, int index) {
public void addSubView(View child, int index) {
if (child == null || getRealView() == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public ViewGroup getRealView() {
}

@Override
protected void addSubView(View view, int index) {
public void addSubView(View view, int index) {
if (view == null || mAdapter == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ZoomTransformer createTransformer() {
}

@Override
protected void addSubView(View view, final int index) {
public void addSubView(View view, final int index) {
if (view == null || mAdapter == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

import android.content.Context;
import android.content.Intent;
import android.support.annotation.RestrictTo;
import android.support.annotation.RestrictTo.Scope;
import android.util.Pair;
import android.support.annotation.Nullable;
import android.util.Pair;
import android.view.Menu;
Expand Down Expand Up @@ -308,7 +311,8 @@ protected Pair<WXComponent, Integer> rearrangeIndexAndGetChild(int index){
}
}

protected void addSubView(View child, int index) {
@RestrictTo(Scope.LIBRARY)
public void addSubView(View child, int index) {
if (child == null || getRealView() == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ private void relocateAppearanceHelper() {
* com.taobao.weex.ui.view.listview.WXRecyclerView}
*/
@Override
protected void addSubView(View child, int index) {
public void addSubView(View child, int index) {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ && getDomObject() instanceof WXRecyclerDomObject){
* com.taobao.weex.ui.view.listview.WXRecyclerView}
*/
@Override
protected void addSubView(View child, int index) {
public void addSubView(View child, int index) {

}

Expand Down