1、其内 de 子控件高宽度为 0?1234567AlertDialog.Builder builder = new AlertDialog.Builder(StoryActivity.this);View view = LayoutInflater.from(StoryActivity.this).inflate(R.layout.dialog_qr_display, null, false);ImageView iv = (ImageView)view.findViewById(R.id.iv);AlertDialog dialog = builder.setView(view).setTitle("分享").create();dialog.show();iv.getWidth(); //为0iv.getHeight(); //为0
通过下列代码解决
|
|