I was wondering how to change the the layout of an xml file based on a conditional. So lets say we have a layout as such..\[code\]<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" androidrientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">\[/code\] \[code\]<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" androidrientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/app_background" androidadding="5dip" ><ListView android:id="@+id/xlist" android:layout_width="fill_parent" android:layout_height="wrap_content" android:cacheColorHint="#00000000" android:divider="@drawable/listdivider" android:dividerHeight="19dp" /> <TextView android:layout_width="fill_parent" android:background="@drawable/listdivider" android:layout_height="19dp" android:visibility="gone" android:id="@+id/dividerline" /> <ListView android:id="@+id/ylist" android:layout_width="fill_parent" android:layout_height="wrap_content" android:cacheColorHint="#00000000" android:divider="@drawable/listdivider" android:dividerHeight="19dp" /></LinearLayout></LinearLayout>\[/code\]So you set two Variables as listviews, and based on the xml the "xlist" will appear before the "ylist". But for my code I would like to switch the ordering of this view if a certain condition is met. So how would I go about switching the order so that if a certain condition is met, the "ylist" will appear above the "xlist"?