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 6007235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:39:08+00:00 2026-05-23T01:39:08+00:00

I am trying to create a custom tabbed layout with a viewflipper. Therefore, I

  • 0

I am trying to create a custom tabbed layout with a viewflipper. Therefore, I need two buttons side-by-side at the top of the screen. I have this. However, I am trying to get the viewFlipper content below these two buttons. Here is my current XML (which does not show the textviews)

        <LinearLayout
 android:id="@+id/linearLayout01" 
 android:layout_width="fill_parent" 
 android:layout_height="fill_parent" 
 android:orientation="vertical"
 android:background="#FAFAFA"
 xmlns:android="http://schemas.android.com/apk/res/android">

    <LinearLayout 
        android:id="@+id/linearLayout02" 
        android:orientation="vertical" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content">
            <Button android:id="@+id/button1" android:text="button 1" android:layout_height="wrap_content" android:layout_width="0dip" layout_weight = ".5"/>
            <Button android:id="@+id/button2" android:text="button 2" android:layout_height="wrap_content" android:layout_width="0dip" layout_weight = ".5"/>
    </LinearLayout>
<RelativeLayout
    android:id="@+id/relativeLayout01"
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    android:layout_below="@id/linearLayout02">
    <ViewFlipper 
        android:layout_height="fill_parent" 
        android:layout_width="fill_parent" 
        android:id="@+id/viewFlipper01">

        <include 
            android:id="@+id/one" 
            layout="@layout/view_one" />
        <include 
            android:id="@+id/two" 
            layout="@layout/view_two" />

    </ViewFlipper>
    </RelativeLayout>
</LinearLayout>
  • 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-23T01:39:09+00:00Added an answer on May 23, 2026 at 1:39 am

    Your LinearLayout that contains the buttons has a layout_height="fill_parent". You need to set that to wrap_content and also specify the orientation="vertical" in the parent LinearLayout. You’ll also need to specify a layout_weight for the view that you want to stretch to fill.

    Because linearLayout01 LinearLayout has its layout_height set to fill_parent, android is going to make it take up the reset of the screen. The content below that will not be visible at all because it is off the screen.

    <LinearLayout
     android:id="@+id/linearLayout01" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" 
     xmlns:android="http://schemas.android.com/apk/res/android">
    
    <LinearLayout
     android:id="@+id/linearLayout02" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content">
        <Button android:id="@+id/button01" android:layout_height="wrap_content" android:text="Button 1" android:layout_width="0dip" android:layout_weight="1"></Button>
        <Button android:id="@+id/button02" android:layout_height="wrap_content" android:text="Button 2" android:layout_width="0dip" android:layout_weight="1"></Button>
    </LinearLayout>
    
    <RelativeLayout
     android:id="@+id/relativeLayout01" 
     android:layout_width="fill_parent" 
     android:layout_height="0dp"
     android:layout_weight="1">
        <ViewFlipper
            android:id="@+id/flipper01"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            >
        <TextView
            android:id="@+id/textview01"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Text"
            />  
            <TextView
            android:id="@+id/textview02"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Text2"
            />  
    
        </ViewFlipper>
        </RelativeLayout>
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create custom layout for android. It normally draws on screen, but
I'm trying to create a custom control - a button - which will have
I am trying to create custom bullet points and it is not working. This
Im trying to create a custom formatter in Symfony 1.4. I have embedded form
I am trying to create a custom table using custom module. I have been
Trying to create a custom component that gets it's layout from an XML file
I'm trying to create a custom ListView layout similar to android.R.layout.simple_list_item_2. However, when I
I'm trying to create a custom layout for managing preferences. I know there is
I'm trying to create a custom helper like this: # app/controllers/my_controller.rb class MyController <
I'm trying to create custom AlertDialog with an image text and buttons. When I

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.