You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
implement PopupWindow.update()
This commit is contained in:
@@ -669,9 +669,9 @@ public class ListPopupWindow {
|
||||
|
||||
mPopup.setOutsideTouchable(!mForceIgnoreOutsideTouch && !mDropDownAlwaysVisible);
|
||||
|
||||
// mPopup.update(getAnchorView(), mDropDownHorizontalOffset,
|
||||
// mDropDownVerticalOffset, (widthSpec < 0)? -1 : widthSpec,
|
||||
// (heightSpec < 0)? -1 : heightSpec);
|
||||
mPopup.update(getAnchorView(), mDropDownHorizontalOffset,
|
||||
mDropDownVerticalOffset, (widthSpec < 0)? -1 : widthSpec,
|
||||
(heightSpec < 0)? -1 : heightSpec);
|
||||
// mPopup.getContentView().restoreDefaultFocus();
|
||||
} else {
|
||||
final int widthSpec;
|
||||
|
||||
@@ -45,6 +45,7 @@ public class PopupWindow {
|
||||
protected native void native_showAsDropDown(long widget, long anchor, int xoff, int yoff, int gravity);
|
||||
protected native boolean native_isShowing(long widget);
|
||||
protected native void native_dismiss(long widget);
|
||||
protected native void native_update(long widget, long anchor, int xoff, int yoff, int width, int height);
|
||||
|
||||
public void setBackgroundDrawable(Drawable background) {}
|
||||
|
||||
@@ -109,4 +110,8 @@ public class PopupWindow {
|
||||
public void setTouchModal(boolean touchModal) {}
|
||||
|
||||
public void setElevation(float elevation) {}
|
||||
|
||||
public void update(View anchor, int xoff, int yoff, int width, int height) {
|
||||
native_update(popover, anchor.widget, xoff, yoff, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user