Note that there are some explanatory texts on larger screens.

plurals
  1. PORelativeLayout, ScrollView and navigation bar at bottom
    primarykey
    data
    text
    <p>What I want to do is, make layout like this:</p> <p>Title</p> <p>Date</p> <p>Long text with scrolling</p> <p>Navigation bar stick to the bottom</p> <p>Well I have done everything, however there is a little problem with scrolling. I want only to scroll text. Title and date should be stick to the top, and nav bar to the bottom of activity. And yes, it works, but my nav bar overlaps text :/ </p> <p>I tried everything, there is one solution I found, set fixed height for Scrollview, but this will not work on every devices well, isn't it? I probably could do some calculation in code, and on it change height, but I would like to stay in XML.</p> <p>Any one have any suggestions?</p> <p>Here is my XML file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:orientation="vertical" &gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" &gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.6" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/feed_title" style="@style/h1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical" /&gt; &lt;TextView android:id="@+id/feed_info" style="@style/h2" android:layout_width="match_parent" android:layout_height="wrap_content" /&gt; &lt;/LinearLayout&gt; &lt;ImageView android:id="@+id/feed_fav_ico" android:layout_width="50dp" android:layout_height="50dp" android:layout_alignParentRight="true" android:layout_gravity="center_vertical|right" android:background="@drawable/ic_fav_off" /&gt; &lt;/LinearLayout&gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="match_parent" android:fillViewport="true" android:scrollY="20dp" &gt; &lt;TextView android:id="@+id/feed_text" style="@style/text" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Loren ipsum full tekst" /&gt; &lt;/ScrollView&gt; &lt;/LinearLayout&gt; &lt;!-- Buttons --&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:background="#FFFFFF" android:orientation="vertical" android:paddingBottom="5dp" &gt; &lt;Button android:id="@+id/go_to_article" style="@style/button_screen" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:layout_marginTop="15dp" android:text="@string/feed_show_full" /&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" &gt; &lt;Button android:id="@+id/next_feed" style="@style/button_screen" android:layout_width="40dp" android:layout_height="40dp" android:background="@drawable/button_arrow_up" /&gt; &lt;Button android:id="@+id/share_feed" style="@style/button_screen" android:layout_width="100dp" android:layout_height="40dp" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:text="@string/feed_share" /&gt; &lt;Button android:id="@+id/delete_feed" style="@style/button_screen" android:layout_width="100dp" android:layout_height="40dp" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:text="@string/feed_delete" /&gt; &lt;Button android:id="@+id/prev_feed" android:layout_width="40dp" android:layout_height="40dp" android:background="@drawable/button_arrow_down" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;!-- ~Buttons --&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload