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

  • SEARCH
  • Home
  • 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 7939593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:08:53+00:00 2026-06-03T23:08:53+00:00

I want to add the same header for navigation to all the pages on

  • 0

I want to add the same header for navigation to all the pages on the app.

It should look something like this:

----------------------------
  Button1 Button2 Button3
----------------------------

Content content content 
...

How can I do that?

So far I found something like this to my existing layouts:

<include android:id="@+id/header"
         layout="@layout/my_header"
         android:layout_height="wrap_content"
         android:layout_width="fill_parent"/> 

But I am not sure how to put the buttons across the top of the header or how to structure that layout.

Any idea what I can do?

Also, for the buttons that will be present on the header, should I add a listener to every page for each of those buttons?

Also, I made this header:

<?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:padding="5dip">

 <Button android:id="@+id/home"
  android:layout_width="wrap_content" android:layout_height="wrap_content"
  android:text="Home"
  android:layout_centerHorizontal="true" />

 <Button android:id="@+id/questions"
  android:layout_width="wrap_content" android:layout_height="wrap_content"
  android:text="My Questions"
  android:layout_centerHorizontal="true" /> 

 <Button android:id="@+id/businesses"
  android:layout_width="wrap_content" android:layout_height="wrap_content"
  android:text="My Businesses"
  android:layout_centerHorizontal="true" />  

 <Button android:id="@+id/learn"
  android:layout_width="wrap_content" android:layout_height="wrap_content"
  android:text="Learning Center"
  android:layout_centerHorizontal="true" />  


 <Button android:id="@+id/extra_help"
  android:layout_width="wrap_content" android:layout_height="wrap_content"
  android:text="Extra Help"
  android:layout_centerHorizontal="true" />  
</RelativeLayout>

But all the buttons show up on top of each other instead of next to each other. How could that be solved?

Thanks!

  • 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-06-03T23:08:55+00:00Added an answer on June 3, 2026 at 11:08 pm
    <?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:padding="5dip">
    
    <Button android:id="@+id/home"
     android:layout_width="wrap_content" android:layout_height="wrap_content"
     android:text="Home"
     />
    
    <Button android:id="@+id/questions"
     android:layout_width="wrap_content" android:layout_height="wrap_content"
     android:text="My Questions"
    android:layout_toRightOf="@+id/home"  /> 
    
    <Button android:id="@+id/businesses"
     android:layout_width="wrap_content" android:layout_height="wrap_content"
     android:text="My Businesses"
     android:layout_toRightOf="@+id/questions" />  
    
     <Button android:id="@+id/learn"
      android:layout_width="wrap_content" android:layout_height="wrap_content"
     android:text="Learning Center"
     android:layout_toRightOf="@+id/businesses" />  
    
    
    <Button android:id="@+id/extra_help"
     android:layout_width="wrap_content" android:layout_height="wrap_content"
     android:text="Extra Help"
    android:layout_toRightOf="@+id/learn"/>  
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add same field to multiple tables. Can I do this with
when asp.net output a page ,I want to add some same parameters for all
I want add my custom sidebar next right column all page. Please check this
I want to add watermark on photos while uploading with paperclip I've got same
I want to add a host header to a website which is working on
i am trying to add some data like header & footer to PDF in
I want to add three variables into the same table cell and separate them
I have dbml with single table users i want add partial class for User
I have a website built with ASP.NET (3.5) and want add some level of
I have a list of string values that I want add to a hashtable

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.