Loading core/java/android/widget/PopupWindow.java +8 −5 Original line number Diff line number Diff line Loading @@ -16,9 +16,10 @@ package android.widget; import java.lang.ref.WeakReference; import com.android.internal.R; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.graphics.Rect; Loading @@ -31,13 +32,13 @@ import android.view.Gravity; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.WindowManager; import android.view.View.OnTouchListener; import android.view.ViewTreeObserver.OnScrollChangedListener; import android.view.WindowManager; import com.android.internal.R; import java.lang.ref.WeakReference; /** * <p>A popup window that can be used to display an arbitrary view. The popup Loading Loading @@ -1032,7 +1033,9 @@ public class PopupWindow { int bottomEdge = displayFrame.bottom; if (ignoreBottomDecorations) { bottomEdge = anchor.getContext().getResources().getDisplayMetrics().heightPixels; Resources res = anchor.getContext().getResources(); bottomEdge = res.getDisplayMetrics().heightPixels - (int) res.getDimension(com.android.internal.R.dimen.screen_margin_bottom); } final int distanceToBottom = bottomEdge - (anchorPos[1] + anchor.getHeight()) - yOffset; final int distanceToTop = anchorPos[1] - displayFrame.top + yOffset; Loading core/res/res/values-xlarge/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ <!-- Height of the status bar --> <dimen name="status_bar_icon_size">50dip</dimen> <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. --> <!-- Margin for permanent screen decorations at the bottom. --> <dimen name="screen_margin_bottom">50dip</dimen> <!-- Default height of a key in the password keyboard for alpha --> <dimen name="password_keyboard_key_height_alpha">0.35in</dimen> Loading core/res/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ <dimen name="status_bar_icon_size">25dip</dimen> <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. --> <dimen name="status_bar_edge_ignore">5dp</dimen> <!-- Margin for permanent screen decorations at the bottom. --> <dimen name="screen_margin_bottom">0dip</dimen> <!-- Size of the fastscroll hint letter --> <dimen name="fastscroll_overlay_size">104dp</dimen> <!-- Width of the fastscroll thumb --> Loading Loading
core/java/android/widget/PopupWindow.java +8 −5 Original line number Diff line number Diff line Loading @@ -16,9 +16,10 @@ package android.widget; import java.lang.ref.WeakReference; import com.android.internal.R; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.graphics.Rect; Loading @@ -31,13 +32,13 @@ import android.view.Gravity; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.WindowManager; import android.view.View.OnTouchListener; import android.view.ViewTreeObserver.OnScrollChangedListener; import android.view.WindowManager; import com.android.internal.R; import java.lang.ref.WeakReference; /** * <p>A popup window that can be used to display an arbitrary view. The popup Loading Loading @@ -1032,7 +1033,9 @@ public class PopupWindow { int bottomEdge = displayFrame.bottom; if (ignoreBottomDecorations) { bottomEdge = anchor.getContext().getResources().getDisplayMetrics().heightPixels; Resources res = anchor.getContext().getResources(); bottomEdge = res.getDisplayMetrics().heightPixels - (int) res.getDimension(com.android.internal.R.dimen.screen_margin_bottom); } final int distanceToBottom = bottomEdge - (anchorPos[1] + anchor.getHeight()) - yOffset; final int distanceToTop = anchorPos[1] - displayFrame.top + yOffset; Loading
core/res/res/values-xlarge/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ <!-- Height of the status bar --> <dimen name="status_bar_icon_size">50dip</dimen> <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. --> <!-- Margin for permanent screen decorations at the bottom. --> <dimen name="screen_margin_bottom">50dip</dimen> <!-- Default height of a key in the password keyboard for alpha --> <dimen name="password_keyboard_key_height_alpha">0.35in</dimen> Loading
core/res/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ <dimen name="status_bar_icon_size">25dip</dimen> <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. --> <dimen name="status_bar_edge_ignore">5dp</dimen> <!-- Margin for permanent screen decorations at the bottom. --> <dimen name="screen_margin_bottom">0dip</dimen> <!-- Size of the fastscroll hint letter --> <dimen name="fastscroll_overlay_size">104dp</dimen> <!-- Width of the fastscroll thumb --> Loading