I've been wanting to add a border to an ImageLayout
and a Space
. I've managed to add a border to an ImageLayout
from this question. However, when I tried to replicate the code for a Space
, it didn't work. I also tried this answer but it also didn't add a border.
How can I add a border to a Space
, or is there another alternative to a Space
which I can add a border to?
ImageView code:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<stroke android:width="1dp" android:color="#000000" />
<padding android:left="1dp" android:top="1dp" android:right="1dp" android:bottom="1dp" />
</shape>
LinearLayout code:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners
android:radius="2dp"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="0dp" />
<stroke
android:width="1dp"
android:color="@android:color/black" />
</shape>