LinearLayout container = new LinearLayout(context);
container.setOrientation(LinearLayout.VERTICAL);
for (int i = 0; i < VERTICAL_ALIGNMENTS.length; i++) {
int va = VERTICAL_ALIGNMENTS[i];
for (int j = 0; j < HORIZONTAL_ALIGNMENTS.length; j++) {
int ha = HORIZONTAL_ALIGNMENTS[j];
LayoutParams lp = new LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
lp.gravity = va | ha;
View v = create(context, VERTICAL_NAMES[i] + "-" + HORIZONTAL_NAMES[j], 20);
container.addView(v, lp);
}
}
return container;