Code example for ViewParent

Methods: getParent

		if (vp == null) {
			return false; 
		} else if (vCandAncestor == vp) {
			return true; 
		} else { 
			return isDescendant(vp.getParent(), vCandAncestor);
	 * pull a list of strings from a list of views. 
	 * @param viewList 
	 * @return List of strings.  If the corresponding view does not derive from text view, then insert an empty string for that element. 
	public static List<String> getStringsFromViews(List<View> viewList) {
		List<String> stringList = new ArrayList<String>(viewList.size());
		for (Iterator<View> viewIter = viewList.iterator(); viewIter.hasNext();) {
			View view =;
			if (view instanceof TextView) {
				stringList.add(((TextView) view).getText().toString());		
Connect your IDE to all the code out there  Get Codota for Java