android window 大小,android popupWindow 中宽度莫名很大,求帮助?
這個是popupwindow的內(nèi)容xml(就是放了個ListView):
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/ppw_settings_normal"
android:orientation="vertical" >
android:id="@+id/lv_ppw_settings_lists"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:dividerHeight="0dp"
android:listSelector="@android:color/transparent" >
展現(xiàn)popupwindow的時候,
public MenuPopup(final Context context) {
**super(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);**
View contentView = LayoutInflater.from(context).inflate(resId, null);
ListView lv = (ListView) contentView
.findViewById(R.id.lv_ppw_settings_lists);
String[] menuItems = context.getResources().getStringArray(R.array.associator_query_menu);
PopupSettingsAdapter adapter = new PopupSettingsAdapter(context, menuItems);
....
}
我都用了wrap_content了
然而結(jié)果卻是:
醉了,這是什么緣故。。。
總結(jié)
以上是生活随笔為你收集整理的android window 大小,android popupWindow 中宽度莫名很大,求帮助?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 憨豆先生的所有电影是?憨豆先生(罗温,艾
- 下一篇: 强直性脊柱炎怎么做试管婴儿