2013年8月8日星期四

Android popupwindow plus white background box, the edges appearblack line

popupwindow plus white background box, edge a black line, how to remove, seeking help heroes
Code:
public class MusicPopup2 {
private PopupWindow music;
private View vt;
private Context context;
private int width = 70;
private int height = 145;
public MusicPopup2 (Context c) {
context = c;
View ebook_popwindow_music = View.inflate (context, R.layout . popup, null);
/ / R.layout.popup is a LinearLayout with background
music = new PopupWindow (ebook_popwindow_music, width, height);
}
public void show (View parent) {
vt = parent;
music.showAtLocation (vt, 0, 580, 809);
}
}


------ Solution ------------------------------------ --------
visual is written inside R.layout.popup you this question, made up to look at the XML file.
------ Solution ---------------------------------------- ----
you load that layout problems. I tried using popupwindow no black line.
what appears quit the general layout of the code thing ..
------ Solution ------------------------ --------------------
your landlord popupwindow the height and width in R.layout.popup set up inside the linearlayout on the line
then popupwindow highly adaptive to adapt it into a
should be on it. .
personal_popupWindow = new PopupWindow (this.getLayoutInflater (). inflate (R.layout.personal_popupwindow, null),
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
If this does not work is that you have a problem layout. . .
------ For reference only -------------------------------------- -
popup.xml content android: background = "@ drawable / musicback" in musicback is a pure white background image, popupwindow is used to display the image in a pop-up comes on the Activity, seeking help heroes


xmlns: android = "http://schemas.android.com/apk/res/android"
android: layout_width = "70px"
android: layout_height = "145px"
android: orientation = "vertical"
android: background = "@ drawable / musicback">
android: layout_width = "70px"
android: layout_height = "137px"
android: orientation = "vertical">
android: id = "@ + id / imagebutton_ebook_popwindow_bottomtitle_random"
android: layout_height = "58px"
android: layout_width = "58px"
android: layout_marginLeft = "8px"
android: layout_marginTop = "5px"
android: background = "@ drawable/random1"
>

android: id = "@ + id / imagebutton_ebook_popwindow_bottomtitle_repeat"
android: layout_height = "58px"
android: layout_width = "58px"
android: layout_marginLeft = "8px"
android: layout_marginTop = "5px"
android: background = "@ drawable/repeat1"
>



------ For reference only ------------------------- --------------

upstairs to say ah, this layout picture in question do
------ For reference only --------------------- ------------------
  This reply was moderator deleted at 2012-05-17 09:51:18

------ For reference only ---------------------------------- -----
the PopupWindow the background can be set to null,
popupWindow.setBackgroundDrawable (null);

没有评论:

发表评论