Android examples for android.app:Activity Property
convert Activity From Translucent
import android.app.Activity; import java.lang.reflect.Method; public class Main{ /**//ww w. j av a 2 s . c o m * Convert a translucent themed Activity * {@link android.R.attr#windowIsTranslucent} to a fullscreen opaque * Activity. * <p> * Call this whenever the background of a translucent Activity has changed * to become opaque. Doing so will allow the {@link android.view.Surface} of * the Activity behind to be released. * <p> * This call has no effect on non-translucent activities or on activities * with the {@link android.R.attr#windowIsFloating} attribute. */ public static void convertActivityFromTranslucent(Activity activity) { try { Method method = Activity.class .getDeclaredMethod("convertFromTranslucent"); method.setAccessible(true); method.invoke(activity); } catch (Throwable t) { } } }