I am looking for a way to put a border for either textview or a button programmatically without using the setBackgroundResource method.
The goal I am trying to achieve here is, to change the background color dynamically but with a fixed border. When I use the setBackgroundResource method for the background border, the border doesn't remain after changing the background color programmatically.
Simple example how could be this achieved:
activity_main.xml
MainActivity.java
I thing this will help you.