use of android.widget.GridLayout.Alignment in project android_frameworks_base by ResurrectionRemix.
the class AlignmentTest method create.
public static ViewGroup create(Context context1) {
CONTEXT = context1;
GridLayout container = new GridLayout(context1);
container.setUseDefaultMargins(true);
for (int i = 0; i < VERTICAL_ALIGNMENTS.length; i++) {
Alignment va = VERTICAL_ALIGNMENTS[i];
for (int j = 0; j < HORIZONTAL_ALIGNMENTS.length; j++) {
Alignment ha = HORIZONTAL_ALIGNMENTS[j];
LayoutParams layoutParams = new LayoutParams(spec(i, va), spec(j, ha));
String name = VERTICAL_NAMES[i] + "-" + HORIZONTAL_NAMES[j];
ViewFactory factory = FACTORIES[(i + j) % FACTORIES.length];
container.addView(factory.create(name, 20), layoutParams);
}
}
return container;
}
use of android.widget.GridLayout.Alignment in project platform_frameworks_base by android.
the class AlignmentTest method create.
public static ViewGroup create(Context context1) {
CONTEXT = context1;
GridLayout container = new GridLayout(context1);
container.setUseDefaultMargins(true);
for (int i = 0; i < VERTICAL_ALIGNMENTS.length; i++) {
Alignment va = VERTICAL_ALIGNMENTS[i];
for (int j = 0; j < HORIZONTAL_ALIGNMENTS.length; j++) {
Alignment ha = HORIZONTAL_ALIGNMENTS[j];
LayoutParams layoutParams = new LayoutParams(spec(i, va), spec(j, ha));
String name = VERTICAL_NAMES[i] + "-" + HORIZONTAL_NAMES[j];
ViewFactory factory = FACTORIES[(i + j) % FACTORIES.length];
container.addView(factory.create(name, 20), layoutParams);
}
}
return container;
}
use of android.widget.GridLayout.Alignment in project android_frameworks_base by DirtyUnicorns.
the class AlignmentTest method create.
public static ViewGroup create(Context context1) {
CONTEXT = context1;
GridLayout container = new GridLayout(context1);
container.setUseDefaultMargins(true);
for (int i = 0; i < VERTICAL_ALIGNMENTS.length; i++) {
Alignment va = VERTICAL_ALIGNMENTS[i];
for (int j = 0; j < HORIZONTAL_ALIGNMENTS.length; j++) {
Alignment ha = HORIZONTAL_ALIGNMENTS[j];
LayoutParams layoutParams = new LayoutParams(spec(i, va), spec(j, ha));
String name = VERTICAL_NAMES[i] + "-" + HORIZONTAL_NAMES[j];
ViewFactory factory = FACTORIES[(i + j) % FACTORIES.length];
container.addView(factory.create(name, 20), layoutParams);
}
}
return container;
}
use of android.widget.GridLayout.Alignment in project android_frameworks_base by crdroidandroid.
the class AlignmentTest method create.
public static ViewGroup create(Context context1) {
CONTEXT = context1;
GridLayout container = new GridLayout(context1);
container.setUseDefaultMargins(true);
for (int i = 0; i < VERTICAL_ALIGNMENTS.length; i++) {
Alignment va = VERTICAL_ALIGNMENTS[i];
for (int j = 0; j < HORIZONTAL_ALIGNMENTS.length; j++) {
Alignment ha = HORIZONTAL_ALIGNMENTS[j];
LayoutParams layoutParams = new LayoutParams(spec(i, va), spec(j, ha));
String name = VERTICAL_NAMES[i] + "-" + HORIZONTAL_NAMES[j];
ViewFactory factory = FACTORIES[(i + j) % FACTORIES.length];
container.addView(factory.create(name, 20), layoutParams);
}
}
return container;
}
Aggregations