my android app doesn’t work even though there isn’t an error

I just wanna draw 100 randomly colored circles but i see a flash of circles for about a half second and it just disappears. I tried to fix it out on my own for 3 hours but couldn’t find a clue. Tried constraint layout etc..
for you to note, there isn’t an error.
what is the problem? i thought it was because of layout i don’t understand completely at this moment. Help a little sheep coder

Android java code:

package com.example.seido.bubbledraw0408;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Handler;
import android.util.AttributeSet;
import android.support.v7.widget.AppCompatImageView;
import android.widget.ImageView;

import java.util.ArrayList;

/**
 * Created by seido on 2018-04-08.
 */

 public class BubbleView extends AppCompatImageView {

    private ArrayList<Bubble> bubbleList;
    private final int DELAY = 16;
    private Paint myPaint = new Paint(); //allow us to draw
    private Handler h; // like Timer in eclipse
    private int size = 30;

    public BubbleView(Context context, AttributeSet attr){
        super(context, attr);

        bubbleList = new ArrayList<Bubble>();
        myPaint.setColor(Color.WHITE);
        h = new Handler();

    }


    protected void onDraw(Canvas c){

        // just to test the ability to draw
        for(int x = 0; x < 100; x++)
            bubbleList.add(new Bubble((int)(Math.random() * 300),
                    (int)(Math.random() * 400), 50));


        // draw all the bubbles on the screen
        for(Bubble bubble : bubbleList) {
            myPaint.setColor(bubble.color);
            c.drawOval(bubble.x, bubble.y,
                    bubble.x, bubble.y, myPaint);
        }
    }

    public class Bubble {

        public int x;
        public int y;
        public int size;
        public int MAX = 5;
        public int xSpeed;
        public int ySpeed;
        public int color;

        Bubble(int newX, int newY, int newSize){

            x = newX;
            y = newY;
            size = newSize;
            color = Color.argb((int)(Math.random() * 256), (int)(Math.random() * 256) ,
                    (int)(Math.random() * 256), (int)(Math.random() * 256));

            xSpeed = (int)(Math.random() * 2 * MAX - MAX);
            ySpeed = (int)(Math.random() * 2 * MAX - MAX);

            if(xSpeed == 0 || ySpeed == 0) {
                xSpeed = 1;
                ySpeed = 1;
            }

        }

        public void randomMotion() {

            x += xSpeed;
            y += ySpeed;

            if(x <= size/2 || x >= getWidth() - size/2) {
                xSpeed = -1 * xSpeed;
            }
            if(y <= size/2 || y >= getHeight() - size/2) {
                ySpeed = -1 * ySpeed;
            }

        }


    }

}

XML code

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom = "16dp"
android:background="#000000"
tools:context="com.example.seido.bubbledraw0408.BubbleView">

<com.example.seido.bubbledraw0408.BubbleView
    android:layout_width = "match_parent"
    android:layout_height = "match_parent" />

</LinearLayout>

my android app doesn’t work even though there isn’t an error