Search in sources :

Example 1 with Window

use of android.view.Window in project cw-omnibus by commonsguy.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Window window = getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    window.setStatusBarColor(getResources().getColor(R.color.primary_dark));
    mgr = (MediaProjectionManager) getSystemService(MEDIA_PROJECTION_SERVICE);
}
Also used : Window(android.view.Window)

Example 2 with Window

use of android.view.Window in project SimplifyReader by chentao0707.

the class BaseFragmentActivity method setTranslucentStatus.

/**
     * set status bar translucency
     *
     * @param on
     */
protected void setTranslucentStatus(boolean on) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        Window win = getWindow();
        WindowManager.LayoutParams winParams = win.getAttributes();
        final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
        if (on) {
            winParams.flags |= bits;
        } else {
            winParams.flags &= ~bits;
        }
        win.setAttributes(winParams);
    }
}
Also used : Window(android.view.Window) WindowManager(android.view.WindowManager)

Example 3 with Window

use of android.view.Window in project SimplifyReader by chentao0707.

the class BaseAppCompatActivity method setTranslucentStatus.

/**
     * set status bar translucency
     *
     * @param on
     */
protected void setTranslucentStatus(boolean on) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        Window win = getWindow();
        WindowManager.LayoutParams winParams = win.getAttributes();
        final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
        if (on) {
            winParams.flags |= bits;
        } else {
            winParams.flags &= ~bits;
        }
        win.setAttributes(winParams);
    }
}
Also used : Window(android.view.Window) WindowManager(android.view.WindowManager)

Example 4 with Window

use of android.view.Window in project SimplifyReader by chentao0707.

the class BasePlayerActivity method setTranslucentStatus.

/**
     * set status bar translucency
     *
     * @param on
     */
protected void setTranslucentStatus(boolean on) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        Window win = getWindow();
        WindowManager.LayoutParams winParams = win.getAttributes();
        final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
        if (on) {
            winParams.flags |= bits;
        } else {
            winParams.flags &= ~bits;
        }
        win.setAttributes(winParams);
    }
}
Also used : Window(android.view.Window) WindowManager(android.view.WindowManager)

Example 5 with Window

use of android.view.Window in project Trello-Android by chrisHoekstra.

the class TabActivityGroup method startChildActivity.

/**
     * Starts an Activity as a child Activity to this.
     * @param Id Unique identifier of the activity to be started.
     * @param intent The Intent describing the activity to be started.
     * @throws android.content.ActivityNotFoundException.
     */
public void startChildActivity(String Id, Intent intent) {
    Window window = getLocalActivityManager().startActivity(Id, intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
    if (window != null) {
        mIdList.add(Id);
        setContentView(window.getDecorView());
    }
}
Also used : Window(android.view.Window)

Aggregations

Window (android.view.Window)310 View (android.view.View)69 WindowManager (android.view.WindowManager)56 TextView (android.widget.TextView)34 TargetApi (android.annotation.TargetApi)26 ImageView (android.widget.ImageView)25 Activity (android.app.Activity)17 Dialog (android.app.Dialog)17 ViewGroup (android.view.ViewGroup)17 ColorDrawable (android.graphics.drawable.ColorDrawable)16 AdapterView (android.widget.AdapterView)16 PhoneWindow (com.android.internal.policy.PhoneWindow)15 Intent (android.content.Intent)11 Context (android.content.Context)10 LayoutInflater (android.view.LayoutInflater)10 WindowDecorActionBar (com.android.internal.app.WindowDecorActionBar)10 RemoteException (android.os.RemoteException)9 DisplayMetrics (android.util.DisplayMetrics)9 LinearLayout (android.widget.LinearLayout)9 PopupWindow (android.widget.PopupWindow)8