Java Code Examples for android.view.View.addTouchables()

The following are Jave code examples for showing how to use addTouchables() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: android-project-gallery   File: ViewPagerCompat.java   Source Code and License Vote up 7 votes
/**
 * 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);
            }
        }
    }
}
 
Example 2
Project: GitHub   File: DirectionalViewpager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 3
Project: GitHub   File: VerticalViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 4
Project: GitHub   File: BaseViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 5
Project: VerticalWebView   File: VerticalParentViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 6
Project: YViewPagerDemo   File: YViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 7
Project: YViewPagerDemo   File: YViewPagerNew.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 8
Project: YViewPagerDemo   File: YViewPagerOrigin.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 9
Project: JewelryUI   File: ViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 10
Project: ChangeTabLayout   File: VerticalViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 11
Project: WebPager   File: CustomViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
			}
		}
	}
}
 
Example 12
Project: Sega   File: ViewPagerEx.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 13
Project: exciting-app   File: AbsHListView.java   Source Code and License Vote up 6 votes
/**
 * {@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);
	}
}
 
Example 14
Project: TextReader   File: DirectionalViewpager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 15
Project: BookReader-master   File: DirectionalViewpager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 16
Project: Rey-MusicPlayer   File: VelocityViewPager.java   Source Code and License Vote up 6 votes
/**
 * 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);
            }
        }
    }
}
 
Example 17
Project: letv   File: AbsHListView.java   Source Code and License Vote up 5 votes
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);
        }
    }
}
 
Example 18
Project: letv   File: ViewPager.java   Source Code and License Vote up 5 votes
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);
            }
        }
    }
}
 
Example 19
Project: boohee_v5.6   File: PLA_AbsListView.java   Source Code and License Vote up 5 votes
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);
        }
    }
}
 
Example 20
Project: boohee_v5.6   File: ViewPager.java   Source Code and License Vote up 5 votes
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);
            }
        }
    }
}