Touch Not Working on Realme 5 Pro

I recently tried to put touch buttons in my theme so that i can toggle some switches. The problem is the touch doesn't respond aside from the vibrating feedback.

Please help. Thanks!

If you are a MIUI user maybe this post can help you.