3232import android .widget .ListAdapter ;
3333import android .widget .WrapperListAdapter ;
3434
35- import com .owncloud .android .lib .common .utils .Log_OC ;
36-
3735import java .lang .reflect .Field ;
3836import java .util .ArrayList ;
3937
4442 * See {@link GridViewWithHeaderAndFooter#addFooterView(View, Object, boolean)}
4543 */
4644public class GridViewWithHeaderAndFooter extends GridView {
47-
48- public static boolean DEBUG = false ;
49-
5045 /**
5146 * A class that represents a fixed view in a list, for example a header at the top
5247 * or a footer at the bottom.
@@ -592,9 +587,6 @@ public boolean hasStableIds() {
592587
593588 @ Override
594589 public View getView (int position , View convertView , ViewGroup parent ) {
595- if (DEBUG ) {
596- Log_OC .d (String .format ("getView: %s, reused: %s" , position , convertView == null ));
597- }
598590 // Header (negative positions will throw an ArrayIndexOutOfBoundsException)
599591 int numHeadersAndPlaceholders = getHeadersCount () * mNumColumns ;
600592 if (position < numHeadersAndPlaceholders ) {
@@ -695,10 +687,6 @@ public int getItemViewType(int position) {
695687 type = adapterViewTypeStart + mHeaderViewInfos .size () + 1 + (footerPosition / mNumColumns + 1 );
696688 }
697689 }
698- if (DEBUG ) {
699- Log_OC .d (String .format ("getItemViewType: pos: %s, result: %s" , position , type ,
700- mCachePlaceHoldView , mCacheFirstHeaderView ));
701- }
702690 return type ;
703691 }
704692
@@ -717,9 +705,6 @@ public int getViewTypeCount() {
717705 }
718706 count += offset ;
719707 }
720- if (DEBUG ) {
721- Log_OC .d (String .format ("getViewTypeCount: %s" , count ));
722- }
723708 return count ;
724709 }
725710
@@ -773,34 +758,6 @@ public void setSelectionFromTop(int position, int y) {
773758 }
774759
775760 setSelection (position );
776- //setSelectionInt(position);
777-
778- /*if (!isInTouchMode()) {
779- position = super.lookForSelectablePosition(position, true);
780- if (position >= 0) {
781- setNextSelectedPositionInt(position);
782- }
783- } else {
784- mResurrectToPosition = position;
785- }*/
786-
787- /*
788- if (position >= 0) {
789- mLayoutMode = LAYOUT_SPECIFIC;
790- mSpecificTop = mListPadding.top + y;
791-
792- if (mNeedSync) {
793- mSyncPosition = position;
794- mSyncRowId = getAdapter().getItemId(position);
795- }
796-
797- if (mPositionScroller != null) {
798- mPositionScroller.stop();
799- }
800-
801- requestLayout();
802- }
803- */
804761 }
805762
806763}
0 commit comments