本帖最后由 HawkOfWinter 于 2012-05-29 07:15:50 编辑

解决方案 »

  1.   

    hw.lcd.density=160 与图片尺寸是:320 * 273的宽,刚好2倍,是巧合吗?
      

  2.   

    density是屏幕的密度,320*480的手机屏幕是标准的,
    drawBitmap是在画布上根据像素来画的,而且初始位置是x,y坐标来定,如果你的屏幕稍大, 右边就会留出空隙,所以很多布局都是用dp来控件控件的大小,dp是像素无关的,
      

  3.   

    如果drawBitmap是在画布上根据像素来画的,那么应该右边留空。结果没啊!
      

  4.   

    sorry,是我错了,刚才又看了下函数说明
    If the bitmap and canvas have different densities, this function will take care of automatically scaling the bitmap to draw at the same density as the canvas.如果位图和画布的density不同,位图会自动伸缩来适应画布
      

  5.   

    你所谓的看了下图片尺寸是320x273,是指电脑上用画图软件打开看到的像素尺寸?还是说 bitmap.getWidth() == 320 getHeight()==273 ?