Frage

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

War es hilfreich?

Lösung

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...

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top