change order of views in linear layout android

android, layout

Solution

I would try to remove all views with `removeView(view)` and add them with `addView(childView, index)` in that order you like.

Problem

As you know the order of views in linear layout is related to the order of them in xml file. Is it possible to change that order with java code by something like indexing?

Original source