解决方案 »

  1.   

    你们的UI呢?这个最简单的把问题丢给UI,然后你的控件就可以设置成wrap_content了。
      

  2.   

    我的意思是你们公司做用户界面的美工。还有你是多张图片还是单张图片。
    http://blog.csdn.net/tu_bingbing/article/details/8726486
    这个链接可以帮到你。还有你的300/500 跟 400/700  怎么可能等比??
      

  3.   

    我已经算出来了,哈哈!等会贴图给你看看,是这样的: /**
     * 相片按相框的比例动态缩放
     * @param context 
     * @param 要缩放的图片
     * @param width 模板宽度
     * @param height 模板高度
     * @return
     */
    public static Bitmap upImageSize(Context context,Bitmap bmp, int width,int height) {
    if(bmp==null){
    return null;
    }
    // 计算比例
    float scaleX = (float)width / bmp.getWidth();// 宽的比例
    float scaleY = (float)height / bmp.getHeight();// 高的比例
    //新的宽高
    int newW = 0;
    int newH = 0;
    if(scaleX > scaleY){
    newW = (int) (bmp.getWidth() * scaleX);
    newH = (int) (bmp.getHeight() * scaleX);
    }else if(scaleX <= scaleY){
    newW = (int) (bmp.getWidth() * scaleY);
    newH = (int) (bmp.getHeight() * scaleY);
    }
    return Bitmap.createScaledBitmap(bmp, newW, newH, true);
    }我是这样算的,结果一试OK啊!哈哈!看效果图:
    还有很多各种各样的模板,我就不都贴出来了,这些照片按比例缩放之后,要么是只可以左右滑动,要么就是只可以上下滑动。
      

  4.   

    问题描述的确实没看懂 不过作品到时狠赞可发给我玩玩么?573393519@qq
    .com