Заливка HorizontalScrollView повторяющимся изображением
У меня есть HorizontalScrollview, и я хочу иметь повторяемое изображение, чтобы я мог прокручивать бесконечно влево или вправо. Это мой код XML
<HorizontalScrollView
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:scrollbars="none"
android:fillViewport="true">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageview_scroll"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</LinearLayout>
</HorizontalScrollView>
и это мой код Java
ImageView imageView = findViewById(R.id.imageview_scroll);
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.scroll);
BitmapDrawable bitmapDrawable = new BitmapDrawable(getResources(), bitmap);
bitmapDrawable.setTileModeX(Shader.TileMode.REPEAT);
imageView.setImageBitmap(bitmap);
Однако этот код отображает изображение только один раз и не повторяется.
Как мне этого добиться?