@@ -0,0 +1,1150 @@
+package interdroid.util.view;%0A%0Aimport android.app.Activity;%0Aimport android.content.Context;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0A%0A/**%0A * Various static utility methods for working with views.%0A *%0A * @author nick &lt;palmer@cs.vu.nl&gt;%0A *%0A */%0Apublic class ViewUtil %7B%0A%09/**%0A%09 * Returns the layout inflater for a given activity.%0A%09 * @param activity The activity to get the inflater from.%0A%09 * @return The layout inflater used by this activity%0A%09 */%0A%09public static LayoutInflater getLayoutInflater(final Activity activity) %7B%0A%09%09return (LayoutInflater) activity.getApplicationContext()%0A%09%09%09%09.getSystemService(Context.LAYOUT_INFLATER_SERVICE);%0A%09%7D%0A%0A%09/**%0A%09 * Adds a view on the UI thread of the given activity.%0A%09 * @param activity The activity to run on the UI thread of%0A%09 * @param viewGroup The view group to add to%0A%09 * @param view The view to be added%0A%09 */%0A%09public static void addView(final Activity activity,%0A%09%09%09final ViewGroup viewGroup, final View view) %7B%0A%09%09if (viewGroup != null) %7B%0A%09%09%09activity.runOnUiThread(new Runnable() %7B%0A%09%09%09%09public void run() %7B%0A%09%09%09%09%09viewGroup.addView(view);%0A%09%09%09%09%7D%0A%09%09%09%7D);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Make a new ViewUtil class with some utiltiy methods for working with views.