Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:53:51+00:00 2026-05-27T06:53:51+00:00

What I want to do is, make layout like this: Title Date Long text

  • 0

What I want to do is, make layout like this:

Title

Date

Long text with scrolling

Navigation bar stick to the bottom

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 :/

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.

Any one have any suggestions?

Here is my XML file:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginLeft="5dp"
    android:layout_marginRight="5dp"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="0.6"
            android:orientation="vertical" >

            <TextView
                android:id="@+id/feed_title"
                style="@style/h1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical" />

            <TextView
                android:id="@+id/feed_info"
                style="@style/h2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <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" />
    </LinearLayout>


    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:scrollY="20dp" >

        <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" />
    </ScrollView>
</LinearLayout>

<!-- Buttons -->

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

    <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" />

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >

        <Button
            android:id="@+id/next_feed"
            style="@style/button_screen"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:background="@drawable/button_arrow_up" />

        <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" />

        <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" />

        <Button
            android:id="@+id/prev_feed"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:background="@drawable/button_arrow_down" />
    </LinearLayout>
</LinearLayout>
<!-- ~Buttons -->

</RelativeLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:53:52+00:00Added an answer on May 27, 2026 at 6:53 am

    Here are the things I have changed:

    • Moved top layout to bottom
    • Gave bottom layout name android:id="@+id/bottom_layout"
    • Gave top layout a name android:id="@+id/top_layout" (Not necessary just for clarity)
    • Now top layout will have these properties:

      android:layout_above="@id/bottom_layout"

      android:layout_alignParentTop="true"

      The first one is to make top layout anchored above bottom layout.
      Second one is to align top edge of top layout to parent’s top. Which in this case is RelativeLayout.

    • Now bottom layout will have these properties:

      android:layout_alignParentBottom="true"

      It will tell that bottom edge of bottom layout matches with bottom edge of parent (which is RelativeLayout)

    Below is the fully working layout:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
    <!-- Buttons -->
    
    <LinearLayout
        android:id="@+id/bottom_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:background="#FFFFFF"
        android:orientation="vertical"
        android:paddingBottom="5dp" >
    
        <Button
            android:id="@+id/go_to_article"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="5dp"
            android:layout_marginTop="15dp"
            android:text="Feed full" />
    
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >
    
            <Button
                android:id="@+id/next_feed"
                android:layout_width="40dp"
                android:layout_height="40dp" />
    
            <Button
                android:id="@+id/share_feed"
                android:layout_width="100dp"
                android:layout_height="40dp"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="5dp"
                android:text="share" />
    
            <Button
                android:id="@+id/delete_feed"
                android:layout_width="100dp"
                android:layout_height="40dp"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="5dp"
                android:text="delete" />
    
            <Button
                android:id="@+id/prev_feed"
                android:layout_width="40dp"
                android:layout_height="40dp" />
        </LinearLayout>
    </LinearLayout>
    <!-- ~Buttons -->
    
    <LinearLayout
        android:id="@+id/top_layout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@id/bottom_layout"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="5dp"
        android:orientation="vertical" >
    
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >
    
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0.6"
                android:orientation="vertical" >
    
                <TextView
                    android:id="@+id/feed_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical" />
    
                <TextView
                    android:id="@+id/feed_info"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />
            </LinearLayout>
    
            <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_launcher" />
        </LinearLayout>
    
        <ScrollView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:fillViewport="true"
            android:scrollY="20dp" >
    
            <TextView
                android:id="@+id/feed_text"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/long_test" />
        </ScrollView>
    </LinearLayout>
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make my layout for my first tab something like this: I
For example,I want to make a layout like this: The 'header' can have a
I want to make layout like this: The problem is with aligning TextViews: I
I have created a custom tab layout which look like this,I want to make
I want to make a layout similar to this one: www.ImageBanana.net - layout.png http://www.imagebanana.com/img/9kmlhy66/thumb/layout.png
I want to make my xml layout more modular because this one is going
I am trying to make a simple layout like this: --------- - - -
I want to make Activity like this using GridView. And this Activity have only
Here's what I tried: http://jsfiddle.net/tJxCD/6/ I want to create a layout like this: But
The spark panel component for example can be written like this <Panel title=Skinny> <child

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.