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

The following examples show how to use android.view.View#addTouchables() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: SimplifyReader   File: PLAAbsListView.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * {@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 2
Source Project: RxZhihuDaily   File: ViewPagerCompact.java    License: MIT License 6 votes vote down vote up
/**
 * 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
Source Project: Lay-s   File: PLAAbsListView.java    License: MIT License 6 votes vote down vote up
/**
 * {@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 4
/**
 * 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
/**
 * 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
/**
 * 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 7
Source Project: ticdesign   File: VerticalViewPager.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 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 8
Source Project: android-recipes-app   File: ViewPager.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 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 9
/**
 * 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 10
Source Project: V.FlyoutTest   File: ViewPager.java    License: MIT License 6 votes vote down vote up
/**
 * 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
Source Project: MiBandDecompiled   File: ViewPager.java    License: Apache License 2.0 6 votes vote down vote up
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);
        }
    }

}
 
Example 12
@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 13
/**
 * 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 14
Source Project: EverMemo   File: PLA_AbsListView.java    License: MIT License 6 votes vote down vote up
/**
 * {@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 15
/**
 * 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);
            }
        }
    }
}
 
Example 16
/**
 * 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
/**
 * 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 18
/**
 * 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 19
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);
        }
    }

}
 
Example 20
Source Project: letv   File: AbsHListView.java    License: Apache License 2.0 5 votes vote down vote up
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);
        }
    }
}