2424
2525package 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+
2738import com .alibaba .android .vlayout .LayoutHelper ;
2839import com .alibaba .android .vlayout .Range ;
2940import com .alibaba .android .vlayout .layout .BaseLayoutHelper ;
3041import com .alibaba .android .vlayout .layout .FixAreaLayoutHelper ;
3142import com .alibaba .android .vlayout .layout .MarginLayoutHelper ;
32-
33- import android .support .v4 .util .ArrayMap ;
3443import com .tmall .wireless .tangram .Engine ;
3544import com .tmall .wireless .tangram .MVHelper ;
3645import com .tmall .wireless .tangram .TangramBuilder ;
4958import org .json .JSONException ;
5059import 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-
6361import java .util .ArrayList ;
6462import java .util .Collections ;
6563import 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