I have one Button. If i click the button, the view has added pro grammatically.So the view has created. But I want some solution with some order.
Once If i click the button,the view has added accordingly. But i want to display the newly added view is displayed in first and previously added view displayed finally.
btn_add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
addRow();
}
});
private void addRow(){
View hiddenInfo = getActivity().getLayoutInflater().inflate(R.layout.layout_order_detail, main_layout, false);
main_layout.addView(hiddenInfo);
}