android - PopupWindow padding - too large -
i have popupwindow
using in activity
, , works fine except padding of elements contained within popupwindow
- it's large - literally taking of small popupwindows space. here xml use define popupwindow
:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/homescreen_popup_bg_levels"> <textview android:id="@+id/x" android:layout_width="match_parent" android:layout_height="wrap_content" android:textcolor="#ff000000" android:textsize="12dp"> </textview> <textview android:id="@+id/y" android:layout_width="match_parent" android:layout_height="wrap_content" android:textsize="12dp" android:textcolor="#ff000000"> </textview> </linearlayout>
here screenshot of popupwindow
:
any idea why text being padded down , right much? i've tried adjusting xml padding, etc no luck.
figured out. issue indeed padding of 9-patch image - not including meant os guessing allow text, , pushing text towards center. setting padding element of 9-patch images used background solved issue.
oh, , else note... when using level list, appears android looking @ padding of first image loaded, applying each , every image. (was) using levels contain 4 asymmetric images (call-outs top left, right, bottom left, right), of images getting same padding, pixel pixel, first 1 gets loaded.
to solve issue, i'm setting background image dynamically, rather changing level.
Comments
Post a Comment