문제

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