I'm a beginner on Android Studio and I need your help to apply a specific transparency on my layout.
I applied a background and border color to my layout by using this drawable:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/black" />
<corners android:radius="3dp" />
<stroke android:width="5px" android:color="#ffa500" />
</shape>
Now I want to apply dynamically a transparency to this button (by using a seek bar) but only on the background color I don't want to modify my border color. I tried to use setAlpha function but it also change my border color transparency.
How can I do this? Thanks.