android - Button is not visible in device -


hi using using below layout code display title @ top [fixed], text in center [scrollable] , 2 button in bottom [fixed].

i.e.

    -----------------------    |         header        |    |-----------------------|    |                       |    | content goes here     |    |    (scrollbale)       |    |                       |    |                       |    |                       |    |-----------------------|    | button 1 |   button 2 |    ------------------------- 

i using below code generate above layout:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_root" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/intouch_full_border" android:orientation="vertical" >  <textview     android:id="@+id/title"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:layout_alignparentleft="true"     android:layout_alignparenttop="true"     android:background="@drawable/intouch_border_bottom"     android:gravity="center"     android:paddingbottom="5dp"     android:paddingtop="5dp"     android:text="terms , conditions"     android:textappearance="?android:attr/textappearancelarge"     android:textcolor="@color/black"     android:textsize="17sp" />  <scrollview     android:id="@+id/titlesc"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_below="@+id/title"     android:background="@drawable/intouch_full_border" >      <textview         android:id="@+id/message"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_margintop="5dp"         android:padding="5dp"         android:text="@string/termsncondition"         android:textappearance="?android:attr/textappearancemedium"         android:textcolor="@color/black"         android:textsize="15sp" /> </scrollview>  <linearlayout     android:id="@+id/linear_alert2"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_below="@id/titlesc"     android:gravity="center"     android:layout_alignparentbottom="true"     android:orientation="horizontal"     android:paddingbottom="20dp" >      <button         android:id="@+id/update"         android:layout_width="100dp"         android:layout_height="40dp"         android:layout_gravity="center"         android:layout_margin="10dp"         android:background="@drawable/rounded_edittext"         android:gravity="center"         android:text="accept"         android:textcolor="@color/white" />      <button         android:id="@+id/cancel"         android:layout_width="100dp"         android:layout_height="40dp"         android:layout_gravity="center"         android:layout_margin="10dp"         android:background="@drawable/rounded_edittext"         android:gravity="center"         android:text="cancel"         android:textcolor="@color/white" /> </linearlayout>  </relativelayout> 

your question not 100% clear, i'll try answer thought asking.

change scrollview this:

<scrollview         android:id="@+id/titlesc"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_below="@+id/title"         android:layout_above="@+id/linear_alert2"> 

change buttons this:

<linearlayout         android:id="@+id/linear_alert2"         android:layout_width="match_parent"         android:layout_height="wrap_content"         style="@android:style/buttonbar"         android:gravity="center"         android:layout_alignparentbottom="true"         android:orientation="horizontal"         android:paddingbottom="20dp" >      <button             android:id="@+id/update"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_weight="1"             android:layout_gravity="center"             android:layout_margin="10dp"             android:gravity="center"             android:text="accept" />      <button             android:id="@+id/cancel"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_weight="1"             android:layout_gravity="center"             android:layout_margin="10dp"             android:gravity="center"             android:text="cancel" /> </linearlayout> 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -