diff options
-rw-r--r-- | src/com/cyanogenmod/trebuchet/widget/CustomAbsSpinner.java | 14 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/widget/EcoGallery.java | 6 |
2 files changed, 5 insertions, 15 deletions
diff --git a/src/com/cyanogenmod/trebuchet/widget/CustomAbsSpinner.java b/src/com/cyanogenmod/trebuchet/widget/CustomAbsSpinner.java index 7861f50..d0653a4 100644 --- a/src/com/cyanogenmod/trebuchet/widget/CustomAbsSpinner.java +++ b/src/com/cyanogenmod/trebuchet/widget/CustomAbsSpinner.java @@ -27,7 +27,6 @@ import android.util.AttributeSet; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; -import android.view.animation.Interpolator; import android.widget.ArrayAdapter; import android.widget.SpinnerAdapter; import com.cyanogenmod.trebuchet.R; @@ -44,8 +43,6 @@ public abstract class CustomAbsSpinner extends CustomAdapterView<SpinnerAdapter> int mSelectionRightPadding = 0; int mSelectionBottomPadding = 0; Rect mSpinnerPadding = new Rect(); - View mSelectedView = null; - Interpolator mInterpolator; RecycleBin mRecycler = new RecycleBin(); private DataSetObserver mDataSetObserver; @@ -200,7 +197,7 @@ public abstract class CustomAbsSpinner extends CustomAdapterView<SpinnerAdapter> if (view != null) { // Put in recycler for re-measuring and/or layout - mRecycler.add(selectedPosition, view); + mRecycler.add(view); } if (view != null) { @@ -249,7 +246,7 @@ public abstract class CustomAbsSpinner extends CustomAdapterView<SpinnerAdapter> @Override protected ViewGroup.LayoutParams generateDefaultLayoutParams() { return new ViewGroup.LayoutParams( - ViewGroup.LayoutParams.FILL_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); } @@ -458,7 +455,7 @@ public abstract class CustomAbsSpinner extends CustomAdapterView<SpinnerAdapter> mScrapHeap.put(position, v); } - public void add(int position, View v) { + public void add(View v) { mScrapHeap.put(mScrapHeap.size(), v); } public View get() { @@ -474,19 +471,14 @@ public abstract class CustomAbsSpinner extends CustomAdapterView<SpinnerAdapter> } View get(int position) { - // System.out.print("Looking for " + position); View result = mScrapHeap.get(position); if (result != null) { - // System.out.println(" HIT"); mScrapHeap.delete(position); - } else { - // System.out.println(" MISS"); } return result; } View peek(int position) { - // System.out.print("Looking for " + position); return mScrapHeap.get(position); } diff --git a/src/com/cyanogenmod/trebuchet/widget/EcoGallery.java b/src/com/cyanogenmod/trebuchet/widget/EcoGallery.java index 8c7a741..c983704 100644 --- a/src/com/cyanogenmod/trebuchet/widget/EcoGallery.java +++ b/src/com/cyanogenmod/trebuchet/widget/EcoGallery.java @@ -36,8 +36,6 @@ import android.view.animation.Transformation; import android.widget.Scroller; import com.cyanogenmod.trebuchet.R; -import java.lang.reflect.Field; - public class EcoGallery extends CustomAbsSpinner implements GestureDetector.OnGestureListener { private static final String TAG = "Gallery"; @@ -448,7 +446,7 @@ public class EcoGallery extends CustomAbsSpinner implements GestureDetector.OnGe break; } else { count++; - mRecycler.add(firstPosition + i, child); + mRecycler.add(child); } } } else { @@ -460,7 +458,7 @@ public class EcoGallery extends CustomAbsSpinner implements GestureDetector.OnGe } else { start = i; count++; - mRecycler.add(firstPosition + i, child); + mRecycler.add(child); } } } |