I’ve added some items dynamically like this:
position = position + 1;
LinearLayout myLayout = (LinearLayout) findViewById(R.id.layoutTest);
TimePicker tpAux = new TimePicker(MyClass.this);
tpAux.setIs24HourView(true);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
layoutParams.setMargins(0, 12, 0, 0);
myLayout.addView(tpAux, position, layoutParams);
That code throws when a button is pressed.
The question is, how to get all TimePicker (in this case) items that were created at run time when another button is pressed?
Thanks in advance!
How about using myLayout.getChildCount() and myLayout.getChildAt(int)?