protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.driverinfo); init(); // 初始化 } public void init() { Intent intent = getIntent();
String img = intent.getStringExtra("textImg"); Bitmap bitmap = Bytes2Bimap(img.getBytes()); // 转换图片          ImageView image1 = (ImageView) findViewById(R.id.siji_img_id); image1.setImageBitmap(bitmap); // 设置Bitmap } // 将二进制 转为 Bitmap
private Bitmap Bytes2Bimap(byte[] b) {
if (b.length != 0) {
return BitmapFactory.decodeByteArray(b, 0, b.length);
} else {
return null;
}
}在  xml中 是这么写的<ImageView
android:id="@+id/siji_img_id"
android:maxWidth="100dp"
android:maxHeight="100dp"
/>我已经有  图片的二进制码了, 求教如何显示在 Android程序上求教大神,哪里出错了,    最好能贴出代码,   后天+xml的都要,  谢谢,   在线等,,急!!!!