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

Commit

Permalink
Update vlayout version.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAfc committed Feb 25, 2019
1 parent 5d362b6 commit 049b241
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion tangram/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
}
} else {
compile('com.alibaba.android:vlayout:1.2.19@aar') {
compile('com.alibaba.android:vlayout:1.2.20@aar') {
changing = true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,22 @@

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

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.alibaba.android.vlayout.LayoutHelper;
import com.alibaba.android.vlayout.Range;
import com.alibaba.android.vlayout.layout.BaseLayoutHelper;
import com.alibaba.android.vlayout.layout.FixAreaLayoutHelper;
import com.alibaba.android.vlayout.layout.MarginLayoutHelper;

import android.support.v4.util.ArrayMap;
import com.tmall.wireless.tangram.Engine;
import com.tmall.wireless.tangram.MVHelper;
import com.tmall.wireless.tangram.TangramBuilder;
Expand All @@ -49,17 +58,6 @@
import org.json.JSONException;
import org.json.JSONObject;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;
import android.widget.ImageView;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
Expand Down Expand Up @@ -272,7 +270,7 @@ public void parseWith(@NonNull JSONObject data, @NonNull final MVHelper resolver
}

public static BaseCell createCell(@Nullable Card parent, @NonNull MVHelper resolver, @NonNull JSONObject cellData,
@NonNull ServiceManager serviceManager, boolean appended) {
@NonNull ServiceManager serviceManager, boolean appended) {
if (cellData != null) {
BaseCell cell = null;
String cellType = cellData.optString(Card.KEY_TYPE);
Expand Down Expand Up @@ -391,7 +389,7 @@ protected void parseStyle(@Nullable JSONObject data) {
*/
private LayoutHelper mLayoutHelper = null;

public LayoutHelper getExistLayoutHelper(){
public LayoutHelper getExistLayoutHelper() {
return mLayoutHelper;
}

Expand Down Expand Up @@ -476,9 +474,9 @@ public ViewPropertyAnimator onGetFixViewDisappearAnimator(View fixView) {

if (helper instanceof MarginLayoutHelper) {
((MarginLayoutHelper) helper).setMargin(style.margin[Style.MARGIN_LEFT_INDEX], style.margin[Style.MARGIN_TOP_INDEX],
style.margin[Style.MARGIN_RIGHT_INDEX], style.margin[Style.MARGIN_BOTTOM_INDEX]);
style.margin[Style.MARGIN_RIGHT_INDEX], style.margin[Style.MARGIN_BOTTOM_INDEX]);
((MarginLayoutHelper) helper).setPadding(style.padding[Style.MARGIN_LEFT_INDEX], style.padding[Style.MARGIN_TOP_INDEX],
style.padding[Style.MARGIN_RIGHT_INDEX], style.padding[Style.MARGIN_BOTTOM_INDEX]);
style.padding[Style.MARGIN_RIGHT_INDEX], style.padding[Style.MARGIN_BOTTOM_INDEX]);
}
}

Expand Down Expand Up @@ -556,7 +554,7 @@ public List<BaseCell> getCells() {
}

@NonNull
public ArrayMap<Range<Integer>, Card> getChildren() {
public Map<Range<Integer>, Card> getChildren() {
return mChildren;
}

Expand Down Expand Up @@ -821,7 +819,7 @@ private void adjustPendingCells(boolean silent) {
if (TangramBuilder.isPrintLog()) {
if (mPendingCells.size() > 0 && mInQueueCells.size() > 0) {
Preconditions.checkState(mPendingCells.get(0).position >= mInQueueCells.get(mInQueueCells.size() - 1).position
, "Items in pendingQueue must have large position than Items in queue");
, "Items in pendingQueue must have large position than Items in queue");
}
}
}
Expand Down Expand Up @@ -955,7 +953,7 @@ public BaseCell getPlaceholderCell() {

public boolean requirePlaceholderCell() {
return mPlaceholderRequired && mPlaceholderCell != null && !TextUtils.isEmpty(load)
&& (mCells.size() == 0 || (mCells.size() == 1 && mCells.contains(mPlaceholderCell)));
&& (mCells.size() == 0 || (mCells.size() == 1 && mCells.contains(mPlaceholderCell)));
}

private MVHelper getMVHelper() {
Expand Down Expand Up @@ -1030,7 +1028,7 @@ public JSONArray optJsonArrayParam(String key) {
public Card findChildCardById(String id) {
if (!mChildren.isEmpty()) {
for (int i = 0, size = mChildren.size(); i < size; i++) {
Card card = mChildren.valueAt(i);
Card card = mChildren.get(i);
if (card != null && card.id.equals(id)) {
return card;
}
Expand All @@ -1039,7 +1037,7 @@ public Card findChildCardById(String id) {
return null;
}

public ArrayMap<Range<Integer>, Card> getChildrenCards(){
public Map<Range<Integer>, Card> getChildrenCards() {
return mChildren;
}

Expand Down

0 comments on commit 049b241

Please sign in to comment.