View view = getActivity().getLayoutInflater().inflate(R.layout.category_select_popupwindow_right, null); LinearLayout linearLayoutContainer=(LinearLayout)view.findViewById(R.id.linear_layout_container); /*public LinearLayout.LayoutParams (int width, int height) */ LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT);
Android动态设置布局,为LinearLayout动态添加子控件
最新推荐文章于 2024-05-10 20:50:07 发布