android-AlertDialog 加载xml文件同时显示图片

	View view = LayoutInflater.from(getActivity()).inflate(
				R.layout.check_picture, null);
		LinearLayout linearlayout = (LinearLayout) view
				.findViewById(R.id.linlayoutpic);

		ImageView imageview = (ImageView) view
				.findViewById(R.id.imageViewPicture);
		imageview.setImageBitmap(BitmapFactory.decodeFile(newAddImgName2));
		builderpic = new AlertDialog.Builder(getActivity())
				.setIcon(android.R.drawable.ic_dialog_info)
				.setView(linearlayout).create();
		imageview.setOnClickListener(this);
		builderpic.show();

//check_picture

    android:id="@+id/linlayoutpic"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >


            android:id="@+id/imageViewPicture"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        />


 
 

你可能感兴趣的:(android基础)