Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 049b241

Browse files
committed
Update vlayout version.
1 parent 5d362b6 commit 049b241

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

tangram/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ dependencies {
117117
exclude group: 'com.android.support', module: 'support-annotations'
118118
}
119119
} else {
120-
compile('com.alibaba.android:vlayout:1.2.19@aar') {
120+
compile('com.alibaba.android:vlayout:1.2.20@aar') {
121121
changing = true
122122
}
123123
}

tangram/src/main/java/com/tmall/wireless/tangram/dataparser/concrete/Card.java

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,22 @@
2424

2525
package com.tmall.wireless.tangram.dataparser.concrete;
2626

27+
import android.support.annotation.NonNull;
28+
import android.support.annotation.Nullable;
29+
import android.text.TextUtils;
30+
import android.util.Log;
31+
import android.util.SparseArray;
32+
import android.util.SparseBooleanArray;
33+
import android.view.View;
34+
import android.view.ViewPropertyAnimator;
35+
import android.widget.FrameLayout;
36+
import android.widget.ImageView;
37+
2738
import com.alibaba.android.vlayout.LayoutHelper;
2839
import com.alibaba.android.vlayout.Range;
2940
import com.alibaba.android.vlayout.layout.BaseLayoutHelper;
3041
import com.alibaba.android.vlayout.layout.FixAreaLayoutHelper;
3142
import com.alibaba.android.vlayout.layout.MarginLayoutHelper;
32-
33-
import android.support.v4.util.ArrayMap;
3443
import com.tmall.wireless.tangram.Engine;
3544
import com.tmall.wireless.tangram.MVHelper;
3645
import com.tmall.wireless.tangram.TangramBuilder;
@@ -49,17 +58,6 @@
4958
import org.json.JSONException;
5059
import org.json.JSONObject;
5160

52-
import android.support.annotation.NonNull;
53-
import android.support.annotation.Nullable;
54-
import android.text.TextUtils;
55-
import android.util.Log;
56-
import android.util.SparseArray;
57-
import android.util.SparseBooleanArray;
58-
import android.view.View;
59-
import android.view.ViewPropertyAnimator;
60-
import android.widget.FrameLayout;
61-
import android.widget.ImageView;
62-
6361
import java.util.ArrayList;
6462
import java.util.Collections;
6563
import java.util.Comparator;
@@ -272,7 +270,7 @@ public void parseWith(@NonNull JSONObject data, @NonNull final MVHelper resolver
272270
}
273271

274272
public static BaseCell createCell(@Nullable Card parent, @NonNull MVHelper resolver, @NonNull JSONObject cellData,
275-
@NonNull ServiceManager serviceManager, boolean appended) {
273+
@NonNull ServiceManager serviceManager, boolean appended) {
276274
if (cellData != null) {
277275
BaseCell cell = null;
278276
String cellType = cellData.optString(Card.KEY_TYPE);
@@ -391,7 +389,7 @@ protected void parseStyle(@Nullable JSONObject data) {
391389
*/
392390
private LayoutHelper mLayoutHelper = null;
393391

394-
public LayoutHelper getExistLayoutHelper(){
392+
public LayoutHelper getExistLayoutHelper() {
395393
return mLayoutHelper;
396394
}
397395

@@ -476,9 +474,9 @@ public ViewPropertyAnimator onGetFixViewDisappearAnimator(View fixView) {
476474

477475
if (helper instanceof MarginLayoutHelper) {
478476
((MarginLayoutHelper) helper).setMargin(style.margin[Style.MARGIN_LEFT_INDEX], style.margin[Style.MARGIN_TOP_INDEX],
479-
style.margin[Style.MARGIN_RIGHT_INDEX], style.margin[Style.MARGIN_BOTTOM_INDEX]);
477+
style.margin[Style.MARGIN_RIGHT_INDEX], style.margin[Style.MARGIN_BOTTOM_INDEX]);
480478
((MarginLayoutHelper) helper).setPadding(style.padding[Style.MARGIN_LEFT_INDEX], style.padding[Style.MARGIN_TOP_INDEX],
481-
style.padding[Style.MARGIN_RIGHT_INDEX], style.padding[Style.MARGIN_BOTTOM_INDEX]);
479+
style.padding[Style.MARGIN_RIGHT_INDEX], style.padding[Style.MARGIN_BOTTOM_INDEX]);
482480
}
483481
}
484482

@@ -556,7 +554,7 @@ public List<BaseCell> getCells() {
556554
}
557555

558556
@NonNull
559-
public ArrayMap<Range<Integer>, Card> getChildren() {
557+
public Map<Range<Integer>, Card> getChildren() {
560558
return mChildren;
561559
}
562560

@@ -821,7 +819,7 @@ private void adjustPendingCells(boolean silent) {
821819
if (TangramBuilder.isPrintLog()) {
822820
if (mPendingCells.size() > 0 && mInQueueCells.size() > 0) {
823821
Preconditions.checkState(mPendingCells.get(0).position >= mInQueueCells.get(mInQueueCells.size() - 1).position
824-
, "Items in pendingQueue must have large position than Items in queue");
822+
, "Items in pendingQueue must have large position than Items in queue");
825823
}
826824
}
827825
}
@@ -955,7 +953,7 @@ public BaseCell getPlaceholderCell() {
955953

956954
public boolean requirePlaceholderCell() {
957955
return mPlaceholderRequired && mPlaceholderCell != null && !TextUtils.isEmpty(load)
958-
&& (mCells.size() == 0 || (mCells.size() == 1 && mCells.contains(mPlaceholderCell)));
956+
&& (mCells.size() == 0 || (mCells.size() == 1 && mCells.contains(mPlaceholderCell)));
959957
}
960958

961959
private MVHelper getMVHelper() {
@@ -1030,7 +1028,7 @@ public JSONArray optJsonArrayParam(String key) {
10301028
public Card findChildCardById(String id) {
10311029
if (!mChildren.isEmpty()) {
10321030
for (int i = 0, size = mChildren.size(); i < size; i++) {
1033-
Card card = mChildren.valueAt(i);
1031+
Card card = mChildren.get(i);
10341032
if (card != null && card.id.equals(id)) {
10351033
return card;
10361034
}
@@ -1039,7 +1037,7 @@ public Card findChildCardById(String id) {
10391037
return null;
10401038
}
10411039

1042-
public ArrayMap<Range<Integer>, Card> getChildrenCards(){
1040+
public Map<Range<Integer>, Card> getChildrenCards() {
10431041
return mChildren;
10441042
}
10451043

0 commit comments

Comments
 (0)