Вопрос

I´m banging my head with something stupid (at least I think so).

I need to place the red button at the far right of the screen. Right now I´m using a relative layout but it does not go all the way to the right.

Suggestions? :)

android:layout_alignParentRight="true"
android:layout_centerVertical="true"

Image:

enter image description here

Это было полезно?

Решение

that's because

android:paddingRight="@dimen/activity_horizontal_margin"

value in parent of button in your code

it makes the parent to add "@dimen/activity_horizontal_margin" gap between the right most end of the parent and it's children

remove that line & check whether the display is ok for you...

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top