android.view.View.addTouchables()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(10.4k)|赞(0)|评价(0)|浏览(267)

本文整理了Java中android.view.View.addTouchables()方法的一些代码示例,展示了View.addTouchables()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.addTouchables()方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:addTouchables

View.addTouchables介绍

暂无

代码示例

代码示例来源:origin: smuyyh/BookReader

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: aa112901/remusic

/**
 * We only want the currentPosition page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: chentao0707/SimplifyReader

/**
 * {@inheritDoc}
 */
@Override
public void addTouchables(ArrayList<View> views) {
  final int count = getChildCount();
  final int firstPosition = mFirstPosition;
  final ListAdapter adapter = mAdapter;
  if (adapter == null) {
    return;
  }
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    if (adapter.isEnabled(firstPosition + i)) {
      views.add(child);
    }
    child.addTouchables(views);
  }
}

代码示例来源:origin: TangoAgency/material-intro-screen

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: FolioReader/FolioReader-Android

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: oguzbabaoglu/android-card-pager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override public void addTouchables(@NonNull ArrayList<View> views) {
 // Note that we don't call super.addTouchables().
 // This is okay because a Pager is itself not touchable.
 for (int i = 0; i < getChildCount(); i++) {
  final View child = getChildAt(i);
  if (child.getVisibility() == VISIBLE) {
   ItemInfo ii = infoForChild(child);
   if (ii != null && ii.position == currentItem) {
    child.addTouchables(views);
   }
  }
 }
}

代码示例来源:origin: crosswall/Android-Coverflow

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: HuanHaiLiuXin/CoolViewPager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      CoolViewPager.ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: githubliruiyuan/Animation

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: juliome10/DoubleViewPager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: rohanoid5/Muzesto

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: zhe525069676/BgMoveViewPager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      } /* end of if */
    } /* end of if */
  } /* end of for */
}

代码示例来源:origin: com.google.android/support-v4

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: juliome10/DoubleViewPager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: benniaobuguai/android-auto-scroll-viewpager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: open-android/ViewPager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      YViewPager.ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: open-android/ViewPager

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: gdpancheng/LoonAndroid3

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: kingargyle/adt-leanback-support

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

代码示例来源:origin: firdausmaulan/GlideSlider

/**
 * We only want the current page that is being shown to be touchable.
 */
@Override
public void addTouchables(ArrayList<View> views) {
  // Note that we don't call super.addTouchables(), which means that
  // we don't call View.addTouchables().  This is okay because a ViewPager
  // is itself not touchable.
  for (int i = 0; i < getChildCount(); i++) {
    final View child = getChildAt(i);
    if (child.getVisibility() == VISIBLE) {
      ItemInfo ii = infoForChild(child);
      if (ii != null && ii.position == mCurItem) {
        child.addTouchables(views);
      }
    }
  }
}

相关文章

View类方法