Skip to content

Instantly share code, notes, and snippets.

@AmirHooshangi
Created October 24, 2014 18:54
Show Gist options
  • Save AmirHooshangi/05f06c42e4de38979de6 to your computer and use it in GitHub Desktop.
Save AmirHooshangi/05f06c42e4de38979de6 to your computer and use it in GitHub Desktop.
this code adds each "custom" to same place in the view so they overlap each other .
ViewGroup parent = (ViewGroup) inflater.inflate(R.layout.order_fragment_container,
null);
for (int i = 0; i < 3; i++) {
View custom = inflater.inflate(R.layout.order_form, null);
TextView tv = (TextView) custom.findViewById(R.id.myTextView);
tv.setText("Custom View " + i);
parent.addView(custom,i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment