Merge "Fix bug 3071869 - text anchors are now treated as application sub-panels." into gingerbread
This commit is contained in:
@@ -109,6 +109,7 @@ public class PopupWindow {
|
|||||||
private Drawable mBelowAnchorBackgroundDrawable;
|
private Drawable mBelowAnchorBackgroundDrawable;
|
||||||
|
|
||||||
private boolean mAboveAnchor;
|
private boolean mAboveAnchor;
|
||||||
|
private int mWindowLayoutType = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
|
||||||
|
|
||||||
private OnDismissListener mOnDismissListener;
|
private OnDismissListener mOnDismissListener;
|
||||||
private boolean mIgnoreCheekPress = false;
|
private boolean mIgnoreCheekPress = false;
|
||||||
@@ -622,6 +623,25 @@ public class PopupWindow {
|
|||||||
mLayoutInScreen = enabled;
|
mLayoutInScreen = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the layout type for this window. Should be one of the TYPE constants defined in
|
||||||
|
* {@link WindowManager.LayoutParams}.
|
||||||
|
*
|
||||||
|
* @param layoutType Layout type for this window.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public void setWindowLayoutType(int layoutType) {
|
||||||
|
mWindowLayoutType = layoutType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The layout type for this window.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public int getWindowLayoutType() {
|
||||||
|
return mWindowLayoutType;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Change the width and height measure specs that are given to the
|
* <p>Change the width and height measure specs that are given to the
|
||||||
* window manager by the popup. By default these are 0, meaning that
|
* window manager by the popup. By default these are 0, meaning that
|
||||||
@@ -911,7 +931,7 @@ public class PopupWindow {
|
|||||||
p.format = PixelFormat.TRANSLUCENT;
|
p.format = PixelFormat.TRANSLUCENT;
|
||||||
}
|
}
|
||||||
p.flags = computeFlags(p.flags);
|
p.flags = computeFlags(p.flags);
|
||||||
p.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
|
p.type = mWindowLayoutType;
|
||||||
p.token = token;
|
p.token = token;
|
||||||
p.softInputMode = mSoftInputMode;
|
p.softInputMode = mSoftInputMode;
|
||||||
p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
|
p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ import android.view.MenuItem;
|
|||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewDebug;
|
import android.view.ViewDebug;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.view.ViewGroup.LayoutParams;
|
import android.view.ViewGroup.LayoutParams;
|
||||||
import android.view.ViewParent;
|
import android.view.ViewParent;
|
||||||
import android.view.ViewRoot;
|
import android.view.ViewRoot;
|
||||||
@@ -7675,6 +7676,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
com.android.internal.R.attr.textSelectHandleWindowStyle);
|
com.android.internal.R.attr.textSelectHandleWindowStyle);
|
||||||
mContainer.setSplitTouchEnabled(true);
|
mContainer.setSplitTouchEnabled(true);
|
||||||
mContainer.setClippingEnabled(false);
|
mContainer.setClippingEnabled(false);
|
||||||
|
mContainer.setWindowLayoutType(WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL);
|
||||||
|
|
||||||
setOrientation(pos);
|
setOrientation(pos);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user