当前位置: 首页>>代码示例>>Java>>正文


Java View.addTouchables方法代码示例

本文整理汇总了Java中android.view.View.addTouchables方法的典型用法代码示例。如果您正苦于以下问题:Java View.addTouchables方法的具体用法?Java View.addTouchables怎么用?Java View.addTouchables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.View的用法示例。


在下文中一共展示了View.addTouchables方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addTouchables

import android.view.View; //导入方法依赖的package包/类
/**
 * 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);
            }
        }
    }
}
 
开发者ID:benniaobuguai,项目名称:android-project-gallery,代码行数:19,代码来源:ViewPagerCompat.java

示例2: addTouchables

import android.view.View; //导入方法依赖的package包/类
/**
 * 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);
            }
        }
    }
}
 
开发者ID:youngkaaa,项目名称:YViewPagerDemo,代码行数:19,代码来源:YViewPager.java

示例3: addTouchables

import android.view.View; //导入方法依赖的package包/类
/**
 * 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) {
            YViewPagerNew.ItemInfo ii = infoForChild(child);
            if (ii != null && ii.position == mCurItem) {
                child.addTouchables(views);
            }
        }
    }
}
 
开发者ID:youngkaaa,项目名称:YViewPagerDemo,代码行数:19,代码来源:YViewPagerNew.java

示例4: addTouchables

import android.view.View; //导入方法依赖的package包/类
/**
 * 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) {
            YViewPagerOrigin.ItemInfo ii = infoForChild(child);
            if (ii != null && ii.position == mCurItem) {
                child.addTouchables(views);
            }
        }
    }
}
 
开发者ID:youngkaaa,项目名称:YViewPagerDemo,代码行数:19,代码来源:YViewPagerOrigin.java

示例5: addTouchables

import android.view.View; //导入方法依赖的package包/类
/**
 * 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) {
            ViewPager.ItemInfo ii = infoForChild(child);
            if (ii != null && ii.position == mCurItem) {
                child.addTouchables(views);
            }
        }
    }
}
 
开发者ID:SimonCherryGZ,项目名称:JewelryUI,代码行数:19,代码来源:ViewPager.java

示例6: addTouchables

import android.view.View; //导入方法依赖的package包/类
/**
 * 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);
			}
		}
	}
}
 
开发者ID:fengshihao,项目名称:WebPager,代码行数:19,代码来源:CustomViewPager.java

示例7: addTouchables

import android.view.View; //导入方法依赖的package包/类
/**
 * {@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);
	}
}
 
开发者ID:junchenChow,项目名称:exciting-app,代码行数:22,代码来源:AbsHListView.java

示例8: addTouchables

import android.view.View; //导入方法依赖的package包/类
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);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:15,代码来源:AbsHListView.java

示例9: addTouchables

import android.view.View; //导入方法依赖的package包/类
public void addTouchables(ArrayList<View> views) {
    for (int i = 0; i < getChildCount(); i++) {
        View child = getChildAt(i);
        if (child.getVisibility() == 0) {
            ItemInfo ii = infoForChild(child);
            if (ii != null && ii.position == this.mCurItem) {
                child.addTouchables(views);
            }
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:ViewPager.java


注:本文中的android.view.View.addTouchables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。