private ArrayList<String> getTags() { ArrayList<String> tags = new ArrayList<String>(); int numTags = mTagGrid.getChildCount(); for (int i = 0; i < numTags; i++) { TextView tv = (TextView) mTagGrid.getChildAt(i).findViewById(R.id.tv_tag); // unsafe cast, wutever String tag = tv.getText().toString(); tags.add(tag); } return tags; }