How to re-order the existing xml layout views programmatically

poorwayDakyfree

New Member
I already have one xml file called \[code\]my_times.xml\[/code\]. It contains views like, \[code\]TextView\[/code\], \[code\]EditText\[/code\], \[code\]Spinner\[/code\] and \[code\]ImageView\[/code\].Also I am using one web-service, which tells me the order of these views.For Example, for one of my form field, say FirstName is appearing in the order 1, so this view will come in the first place of my form. If admin on the server changes this order to 2, then FirstName will come on the screen at second position and so on.Is there any way to rearrange/reorder the existing xml layout, without disturbing the existing xml layout.My sample \[code\]my_times.xml\[/code\] looks something like this:\[code\]<LinearLayout><TextView.../><EditText..../><TextView.../><Spinner.../></LinearLayout>\[/code\]Please suggest me the ideal way to rearrange these existing views.There are about 4 to 5 such screens which contains the form like fields that I want to rearrange/reorder dynamically based on the web=service response..
 
Back
Top