browser action mode ---windowActionModeOverlay='true' ---titlebar

activity : windowActionModeOverlay="true"    actionmode 弹出时覆盖部分布局      若 false 则不符盖,将原有布局下移。

在activity 中使用 actionmode 会触发相应的回调方法!!!

流程:


Activity -----

    /**
     * Notifies the Activity that an action mode has been started.
     * Activity subclasses overriding this method should call the superclass implementation.

     *
     * @param mode The new action mode.
     */
    public void onActionModeStarted(ActionMode mode) {
    }

BrowserActivity-------

    @Override
    public void onActionModeStarted(ActionMode mode) {
        super.onActionModeStarted(mode);
        mController.onActionModeStarted(mode);
    }



PhoneUi------

    // action mode callbacks

    @Override
    public void onActionModeStarted(ActionMode mode) {
        if (!isEditingUrl()) {
            hideTitleBar();
        } else {
            mTitleBar.animate().translationY(mActionBarHeight);
        }
    }

你可能感兴趣的:(action,browser)