本帖最后由 chijiunan 于 2011-07-23 23:13:46 编辑

解决方案 »

  1.   

    问题一:
    LayoutInflater inflater = activity.getLayoutInflater();
       View layout = inflater.inflate(R.layout.weatherset,
         (ViewGroup)activity.findViewById(R.id.weatherset));    new AlertDialog.Builder(activity).setTitle("自定义布局").setView(layout)
         .setPositiveButton("确定", null)
         .setNegativeButton("取消", null).show();
       
       Toast.makeText(activity, "ok", Toast.LENGTH_LONG).show();
    weatherset.xml
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/weatherset">
       //这里放你的图片    
    </LinearLayout>
      

  2.   

    首先图片可以看做资源,如果获取资源有API的话,直接用就可以了,没有要想法把资源的格式转换成能够识别的