Android ImageButton border?

I have an ImageButtons series laid out horizontally in LinearLayout. When I make setBackgroundColor in GREEN, these ImageButtons become GREEN rectangles, all connected, which look like a single panel. Is there a way to specify the border between these buttons, so I know where one button starts and where it ends?

+3
source share
2 answers

To make a space between two buttons by displaying Separator (something like Horizontal line), you must add a blankView between two buttons.

, . :

     <View
     android:layout_height="2px"
     android:background="#DDFFDD"
     android:layout_marginTop="5dip"
     android:layout_marginBottom="5dip"/>

.

!!

+4

. Android : padding. , , . , backgroundColor.

- layout_margin margin layout - , . .

layout_margin .

+5

Source: https://habr.com/ru/post/1754186/


All Articles