4

textView の全幅の写真の境界を設定できますか

すみません、私は英語が上手に話せません

私のコード:

   public class ImageGetter implements Html.ImageGetter {
    @Override
    public Drawable getDrawable(String source) {
        Drawable drawable = getResources().getDrawable(R.drawable.imgN);
        if (source.equals("img1")) {
            drawable = getResources().getDrawable(R.drawable.img1);
                drawable.setBounds(0, 0, 100, 150);
        return drawable;
    }
}

幅 = 100% drawable.setBounds(0, 0, 幅, 高さ);

4

0 に答える 0