How to fill with dots in a view? [closed]

You have to achive this through the tileMode.

put this image file on your drawable folder

enter image description here

then

drawable/dot_background.xml:

<?xml version="1.0" encoding="utf-8"?>
    <bitmap xmlns:android="http://schemas.android.com/apk/res/android"
        android:src="https://stackoverflow.com/questions/48047303/@drawable/actual_pattern_image"
        android:tileMode="repeat" />

then set this xml as background on your view

hope this will help help you

Leave a Comment