1
I would like to position the Exit button at the end of my layout. I am using Linearlayout. Some hint on how to position ?
This is the Linear Layout code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.meuprojeto.perfilloginsenha.PerfilActivity">
This is the button code:
<Button
android:id="@+id/btnLogOut"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:text="SAIR"
android:textColor="@color/branco"
android:textSize="20dp"
android:textStyle="bold" />
assigns the
<Space...>
with the propertyandroid:layout_weight="1"
and nothing happened, but when I changed thelayout_height
from zero to another value it went down, but I think it would not be ideal, because it would be a gambiarra and on smaller screens the button would hide.– Fabio Souza
The layout of the answer has been tested, so it works. As you have not put your layout complete I don’t know if there’s anything else that needs to be done.
– ramaral
I did a test with your code really works, I’ll check on mine what might be different
– Fabio Souza