use of android.widget.TableRow.LayoutParams in project android-nfc-paycardreader by rayyan.
the class ECCardInfosActivity method addAIDRow.
private void addAIDRow(CharSequence left, CharSequence right) {
TextView t1 = new TextView(this);
t1.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
t1.setPadding(0, 0, (int) (getResources().getDisplayMetrics().density * 10 + 0.5f), 0);
t1.setTextAppearance(this, android.R.attr.textAppearanceMedium);
t1.setText(left);
TextView t2 = new TextView(this);
t2.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
t2.setText(right);
TableRow tr = new TableRow(this);
tr.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
tr.addView(t1);
tr.addView(t2);
TableLayout t = (TableLayout) findViewById(R.id.table_features);
t.addView(tr, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
}
Aggregations