首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

popupwindow添白色背景框后,边缘出现黑线

2013-08-06 
popupwindow加白色背景框后,边缘出现黑线popupwindow加白色背景框后,边缘出现黑线,怎么才能去掉,求各位大

popupwindow加白色背景框后,边缘出现黑线
popupwindow加白色背景框后,边缘出现黑线,怎么才能去掉,求各位大侠帮忙
代码:
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是一个带背景的LinearLayout
        music = new PopupWindow(ebook_popwindow_music, width,height);
            }
public void show(View parent) {
        vt=parent;
        music.showAtLocation(vt, 0, 580, 809);
}
}


[解决办法]
目测是R.layout.popup你这个里面写的问题,把XML文件发上来看看。
[解决办法]
你载入的那个布局有问题。我用popupwindow就没试过黑线的。
一般布局出现的东西不干代码的事..
[解决办法]
楼主你的popupwindow的高度和宽度在R.layout.popup里面设置那个linearlayout的就行了
再把popupwindow的高度改成自适应来适应它
应该就可以了。。
personal_popupWindow=new PopupWindow(this.getLayoutInflater().inflate(R.layout.personal_popupwindow, null), 
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
如果这样不行就是你布局有问题了。。。

热点排行
Bad Request.