android.support.v7.widget.GridLayoutManager.getPosition()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(119)

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

GridLayoutManager.getPosition介绍

暂无

代码示例

代码示例来源:origin: Dawish/BriskTVLauncher

/**
 * Returns the adapter position of the item represented by the given View. This does not
 * contain any adapter changes that might have happened after the last layout.
 *
 * @param view The view to query
 * @return The adapter position of the item which is rendered by this View.
 */
@Override
public int getPosition(View view) {
  return super.getPosition(view);
}

代码示例来源:origin: Dreamxiaoxuan/AndroidTvDemo

/**
 * Returns the adapter position of the item represented by the given View. This does not contain any adapter changes
 * that might have happened after the last layout.
 *
 * @param view The view to query
 * @return The adapter position of the item which is rendered by this View.
 */
@Override
public int getPosition(View view)
{
  return super.getPosition(view);
}

代码示例来源:origin: 66668/DropDownMenuplus

/**
 * Returns the adapter position of the item represented by the given View. This does not
 * contain any adapter changes that might have happened after the last layout.
 *
 * @param view The view to query
 * @return The adapter position of the item which is rendered by this View.
 */
@Override
public int getPosition(View view) {
  return super.getPosition(view);
}

代码示例来源:origin: Tencent/RapidView

View view = mSet[i];
LayoutParams params = (LayoutParams) view.getLayoutParams();
params.mSpanSize = getSpanSize(recycler, state, getPosition(view));
if (spanDiff == -1 && params.mSpanSize > 1) {
  params.mSpanIndex = span - (params.mSpanSize - 1);

代码示例来源:origin: Tencent/RapidView

int spanSize = getSpanSize(recycler, state, getPosition(view));
final int spec = View.MeasureSpec.makeMeasureSpec(mSizePerSpan * spanSize,
    View.MeasureSpec.EXACTLY);
final View view = mSet[i];
if (mOrientationHelper.getDecoratedMeasurement(view) != maxSize) {
  int spanSize = getSpanSize(recycler, state, getPosition(view));
  final int spec = View.MeasureSpec.makeMeasureSpec(mSizePerSpan * spanSize,
      View.MeasureSpec.EXACTLY);

相关文章