Search in sources :

Example 1 with FloatingActionMode

use of com.android.internal.view.FloatingActionMode in project android_frameworks_base by AOSPA.

the class DecorView method setHandledFloatingActionMode.

private void setHandledFloatingActionMode(ActionMode mode) {
    mFloatingActionMode = mode;
    mFloatingToolbar = new FloatingToolbar(mContext, mWindow);
    ((FloatingActionMode) mFloatingActionMode).setFloatingToolbar(mFloatingToolbar);
    // Will show the floating toolbar if necessary.
    mFloatingActionMode.invalidate();
    mFloatingActionModeOriginatingView.getViewTreeObserver().addOnPreDrawListener(mFloatingToolbarPreDrawListener);
}
Also used : FloatingToolbar(com.android.internal.widget.FloatingToolbar) FloatingActionMode(com.android.internal.view.FloatingActionMode)

Example 2 with FloatingActionMode

use of com.android.internal.view.FloatingActionMode in project platform_frameworks_base by android.

the class StatusBarWindowView method setHandledFloatingActionMode.

private void setHandledFloatingActionMode(ActionMode mode) {
    mFloatingActionMode = mode;
    mFloatingToolbar = new FloatingToolbar(mContext, mFakeWindow);
    ((FloatingActionMode) mFloatingActionMode).setFloatingToolbar(mFloatingToolbar);
    // Will show the floating toolbar if necessary.
    mFloatingActionMode.invalidate();
    mFloatingActionModeOriginatingView.getViewTreeObserver().addOnPreDrawListener(mFloatingToolbarPreDrawListener);
}
Also used : FloatingToolbar(com.android.internal.widget.FloatingToolbar) FloatingActionMode(com.android.internal.view.FloatingActionMode)

Example 3 with FloatingActionMode

use of com.android.internal.view.FloatingActionMode in project android_frameworks_base by crdroidandroid.

the class DecorView method createFloatingActionMode.

private ActionMode createFloatingActionMode(View originatingView, ActionMode.Callback2 callback) {
    if (mFloatingActionMode != null) {
        mFloatingActionMode.finish();
    }
    cleanupFloatingActionModeViews();
    final FloatingActionMode mode = new FloatingActionMode(mContext, callback, originatingView);
    mFloatingActionModeOriginatingView = originatingView;
    mFloatingToolbarPreDrawListener = new ViewTreeObserver.OnPreDrawListener() {

        @Override
        public boolean onPreDraw() {
            mode.updateViewLocationInWindow();
            return true;
        }
    };
    return mode;
}
Also used : FloatingActionMode(com.android.internal.view.FloatingActionMode) ViewTreeObserver(android.view.ViewTreeObserver)

Example 4 with FloatingActionMode

use of com.android.internal.view.FloatingActionMode in project android_frameworks_base by crdroidandroid.

the class StatusBarWindowView method createFloatingActionMode.

private ActionMode createFloatingActionMode(View originatingView, ActionMode.Callback2 callback) {
    if (mFloatingActionMode != null) {
        mFloatingActionMode.finish();
    }
    cleanupFloatingActionModeViews();
    final FloatingActionMode mode = new FloatingActionMode(mContext, callback, originatingView);
    mFloatingActionModeOriginatingView = originatingView;
    mFloatingToolbarPreDrawListener = new ViewTreeObserver.OnPreDrawListener() {

        @Override
        public boolean onPreDraw() {
            mode.updateViewLocationInWindow();
            return true;
        }
    };
    return mode;
}
Also used : FloatingActionMode(com.android.internal.view.FloatingActionMode) ViewTreeObserver(android.view.ViewTreeObserver)

Example 5 with FloatingActionMode

use of com.android.internal.view.FloatingActionMode in project android_frameworks_base by crdroidandroid.

the class StatusBarWindowView method setHandledFloatingActionMode.

private void setHandledFloatingActionMode(ActionMode mode) {
    mFloatingActionMode = mode;
    mFloatingToolbar = new FloatingToolbar(mContext, mFakeWindow);
    ((FloatingActionMode) mFloatingActionMode).setFloatingToolbar(mFloatingToolbar);
    // Will show the floating toolbar if necessary.
    mFloatingActionMode.invalidate();
    mFloatingActionModeOriginatingView.getViewTreeObserver().addOnPreDrawListener(mFloatingToolbarPreDrawListener);
}
Also used : FloatingToolbar(com.android.internal.widget.FloatingToolbar) FloatingActionMode(com.android.internal.view.FloatingActionMode)

Aggregations

FloatingActionMode (com.android.internal.view.FloatingActionMode)20 ViewTreeObserver (android.view.ViewTreeObserver)10 FloatingToolbar (com.android.internal.widget.FloatingToolbar)10