I have a problem that sounds like this: I am creating a set of views dynamically and all of them have the same parameters.
TableLayout tab = (TableLayout) findViewById(R.id.itemsTableLayout);
...
row = new TableRow(this);
row.setLayoutParams(new LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
tab.addView(row);
The question is: How can I get parameters from xml for this layout. I mean how can I use something like getLayoutParams from xml?
Thanks,
Arkde
Won’t inflating view from xml do the trick?
http://developer.android.com/reference/android/view/LayoutInflater.html#inflate(int, android.view.ViewGroup, boolean)