Skip to content

Instantly share code, notes, and snippets.

@mharper
Created August 8, 2011 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mharper/1132754 to your computer and use it in GitHub Desktop.
Save mharper/1132754 to your computer and use it in GitHub Desktop.
Adding inflated subviews to a view
int viewId = 0;
for (Video v : videos) {
newVideoView = inflater.inflate(R.layout.story_video, null);
newVideoView.setId(viewId++);
this.addView(newVideoView);
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment