Search in sources :

Example 6 with BridgeWindowSession

use of com.android.layoutlib.bridge.android.BridgeWindowSession in project android_frameworks_base by ParanoidAndroid.

the class AttachInfo_Accessor method setAttachInfo.

public static void setAttachInfo(View view) {
    Context context = view.getContext();
    WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
    Display display = wm.getDefaultDisplay();
    ViewRootImpl root = new ViewRootImpl(context, display);
    AttachInfo info = new AttachInfo(new BridgeWindowSession(), new BridgeWindow(), display, root, new Handler(), null);
    info.mHasWindowFocus = true;
    info.mWindowVisibility = View.VISIBLE;
    // this is so that we can display selections.
    info.mInTouchMode = false;
    info.mHardwareAccelerated = false;
    view.dispatchAttachedToWindow(info, 0);
}
Also used : Context(android.content.Context) BridgeWindowSession(com.android.layoutlib.bridge.android.BridgeWindowSession) BridgeWindow(com.android.layoutlib.bridge.android.BridgeWindow) Handler(android.os.Handler) AttachInfo(android.view.View.AttachInfo)

Aggregations

Context (android.content.Context)6 Handler (android.os.Handler)6 AttachInfo (android.view.View.AttachInfo)6 BridgeWindow (com.android.layoutlib.bridge.android.BridgeWindow)6 BridgeWindowSession (com.android.layoutlib.bridge.android.BridgeWindowSession)6