How to keep Android Button view in the buttom of the screen? -


i have activity contains 2 components: scroll view , button. want place button @ buttom of screen, fixed.

i tried many things cannot keep button location fixed @ button of screen, bacause content of scroll view increases, button pushed outside activity screen.

i want achieve this: enter image description here

can tell me how achieve this?

my xml file clean (all custom views programmatically written, can't shared!):

<scrollview     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:id="@+id/scrollview"     android:layout_gravity="center_horizontal">      <linearlayout         android:orientation="vertical"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:id="@+id/editableviewgroup"></linearlayout>  </scrollview>  <button     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="save changes"     android:id="@+id/custombutton" /> 

use linearlayout:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent" >      <scrollview         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:fillviewport="true">          <!-- ... -->      </scrollview>      <button         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:text="save changes"/>  </linearlayout> 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -