0

我想在 android 的 x 轴上重复图像。我目前正在使用此代码

        BitmapDrawable bitmapDrawable = new BitmapDrawable(bmp);
        bitmapDrawable.setTileModeXY(Shader.TileMode.REPEAT, null);
        LinearLayout layout = findViewById(R.id.ll);
        layout.setBackgroundDrawable(bitmapDrawable);

但是输出很奇怪。这就是我得到的输出。 在此处输入图像描述

谁能告诉我解决方案?

4

0 回答 0