Android examples for User Interface:View Layer
remove View In Top
//package com.java2s; import android.content.Context; import android.view.View; import android.view.WindowManager; public class Main { public static final String WINDOW_SERVICE = "window"; public static void removeViewInTop(Context context, View view) { WindowManager wm = (WindowManager) context.getApplicationContext() .getSystemService(WINDOW_SERVICE); try {//from w ww . ja v a 2s .com wm.removeView(view); } catch (Exception e) { } } }