android.view.View#addTouchables ( )源码实例Demo

下面列出了android.view.View#addTouchables ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: SimplifyReader   文件: PLAAbsListView.java
/**
 * {@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);
    }
}
 
源代码2 项目: RxZhihuDaily   文件: ViewPagerCompact.java
/**
 * 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);
            }
        }
    }
}
 
源代码3 项目: Lay-s   文件: PLAAbsListView.java
/**
 * {@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);
    }
}
 
/**
 * 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);
            }
        }
    }
}
 
源代码5 项目: fangzhuishushenqi   文件: DirectionalViewpager.java
/**
 * 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);
            }
        }
    }
}
 
源代码6 项目: CodenameOne   文件: ViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码7 项目: ticdesign   文件: VerticalViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码8 项目: android-recipes-app   文件: ViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码9 项目: ChangeTabLayout   文件: VerticalViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码10 项目: V.FlyoutTest   文件: ViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码11 项目: MiBandDecompiled   文件: ViewPager.java
public void addTouchables(ArrayList arraylist)
{
    for (int i1 = 0; i1 < getChildCount(); i1++)
    {
        View view = getChildAt(i1);
        if (view.getVisibility() != 0)
        {
            continue;
        }
        aC ac1 = a(view);
        if (ac1 != null && ac1.b == q)
        {
            view.addTouchables(arraylist);
        }
    }

}
 
源代码12 项目: AndroidStudyDemo   文件: ZrcAbsListView.java
@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);
    }
}
 
源代码13 项目: nono-android   文件: FuckViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码14 项目: EverMemo   文件: PLA_AbsListView.java
/**
 * {@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);
	}
}
 
源代码15 项目: Overchan-Android   文件: VerticalViewPager.java
/**
 * 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 VerticalViewPager
    // 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);
            }
        }
    }
}
 
源代码16 项目: ankihelper   文件: ViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码17 项目: ImageSliderWithSwipes   文件: ViewPagerEx.java
/**
 * 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);
            }
        }
    }
}
 
源代码18 项目: AsteroidOSSync   文件: CustomViewPager.java
/**
 * 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);
            }
        }
    }
}
 
源代码19 项目: MiBandDecompiled   文件: VerticalViewPager.java
public void addTouchables(ArrayList arraylist)
{
    for (int i1 = 0; i1 < getChildCount(); i1++)
    {
        View view = getChildAt(i1);
        if (view.getVisibility() != 0)
        {
            continue;
        }
        F f1 = a(view);
        if (f1 != null && f1.b == l)
        {
            view.addTouchables(arraylist);
        }
    }

}
 
源代码20 项目: letv   文件: AbsHListView.java
public void addTouchables(ArrayList<View> views) {
    int count = getChildCount();
    int firstPosition = this.mFirstPosition;
    ListAdapter adapter = this.mAdapter;
    if (adapter != null) {
        for (int i = 0; i < count; i++) {
            View child = getChildAt(i);
            if (adapter.isEnabled(firstPosition + i)) {
                views.add(child);
            }
            child.addTouchables(views);
        }
    }
}
 
 方法所在类
 同类方法