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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:37:12+00:00 2026-05-24T01:37:12+00:00

in my app i have a application bar at the top and an tab

  • 0

in my app i have a application bar at the top and an tab bar at the bottom. These two are been fixed. Inbetween of them i have place a ViewFipper. Inside the view flipper i have 7 text views, one image views and an 3 image buttons.

Now my problem is i want to show all these inside the space between the application bar and the tab bar in all devices. When i check the layout with 2.7 in QVGA the last buttons get hided behind the tab bar. Whereas in 3.2 in HVGA(ADP2) there are more spaces between the last two image buttons and the tab bar. I want the contents inside the view flipper to be exactly in the middle space, there should not be any scroll view in my layout. How to get this….

Following id my layout design

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/relativeLayout1"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:background="@drawable/back" xmlns:android="http://schemas.android.com/apk/res/android">

    <RelativeLayout android:layout_width="fill_parent" android:layout_marginBottom="10dp"
        android:background="@drawable/graybar" android:layout_height="wrap_content"
        android:id="@+id/relativeLayout2">

        <TextView android:text="Detail" android:id="@+id/textView1"
            android:textSize="24sp" android:layout_centerInParent="true"
            android:layout_height="wrap_content" android:layout_width="wrap_content">
        </TextView>
        <TextView android:layout_width="wrap_content" android:text="Share Festival"
            android:gravity="center" android:textStyle="bold"
            android:layout_height="wrap_content" android:id="@+id/DetailShare"
            android:layout_alignParentRight="true" android:background="@drawable/share">
        </TextView>
    </RelativeLayout>


    <ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_below="@+id/relativeLayout2" android:layout_above="@+id/relativeLayout4"
        android:id="@+id/flipper" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <RelativeLayout android:id="@+id/RLL"
            android:layout_width="fill_parent" android:layout_height="fill_parent">
            <LinearLayout android:orientation="vertical" android:layout_marginBottom="10dp"
                android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:id="@+id/LL" android:gravity="center">
                <ImageView android:layout_height="wrap_content"
                    android:layout_width="wrap_content" android:id="@+id/imageView1"
                    android:src="@drawable/p144" android:layout_alignParentTop="true">
                </ImageView>
            </LinearLayout>
            <RelativeLayout android:layout_width="fill_parent"
                android:layout_below="@+id/LL" android:layout_height="wrap_content"
                android:id="@+id/RL1">
                <ImageButton android:layout_width="wrap_content"
                    android:layout_height="wrap_content" android:id="@+id/detailback"
                    android:layout_alignParentLeft="true" android:background="@drawable/left">
                </ImageButton>
                <TextView android:text="Detail" android:id="@+id/textView1"
                    android:background="@drawable/share" android:textSize="15sp"
                    android:layout_centerInParent="true" android:gravity="center"
                    android:maxLines="2" android:layout_height="wrap_content"
                    android:layout_width="wrap_content">
                </TextView>
                <ImageButton android:layout_width="wrap_content"
                    android:layout_height="wrap_content" android:id="@+id/DetailShare"
                    android:layout_alignParentRight="true" android:background="@drawable/right">
                </ImageButton>
            </RelativeLayout>

            <LinearLayout android:orientation="vertical"
                android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:id="@+id/Lq1" android:layout_below="@+id/RL1">
                <LinearLayout android:orientation="vertical" 
                    android:layout_width="fill_parent" android:layout_height="wrap_content"
                    android:id="@+id/L2">
                    <TextView android:text="date" android:id="@+id/date"
                        android:textSize="18sp" android:layout_marginTop="5dp"
                        android:layout_gravity="center" 
                        android:layout_height="wrap_content" android:layout_width="wrap_content">
                    </TextView>
                </LinearLayout>
                <LinearLayout android:orientation="vertical" 
                    android:layout_width="fill_parent" android:layout_height="wrap_content"
                    android:id="@+id/L2">
                    <TextView android:text="Contact : " android:id="@+id/contact"
                        android:textSize="18sp" android:layout_marginTop="5dp"
                        android:layout_gravity="center" 
                        android:layout_height="wrap_content" android:layout_width="wrap_content">
                    </TextView>
                </LinearLayout>
                <LinearLayout android:orientation="vertical" 
                    android:layout_width="fill_parent" android:layout_height="wrap_content"
                    android:id="@+id/L2">
                    <TextView android:text="mail" android:id="@+id/mail"
                        android:textSize="18sp" android:layout_marginTop="5dp"
                        android:layout_gravity="center" 
                        android:layout_height="wrap_content" android:layout_width="wrap_content">
                    </TextView>
                </LinearLayout>
                <LinearLayout android:orientation="vertical"
                    android:layout_width="fill_parent" android:layout_height="wrap_content"
                    android:id="@+id/L2">
                    <TextView android:text="phone" android:id="@+id/phone"
                        android:textSize="18sp" android:layout_marginTop="5dp"
                        android:layout_gravity="center"
                        android:layout_height="wrap_content" android:layout_width="wrap_content">
                    </TextView>
                </LinearLayout>
                <LinearLayout android:orientation="vertical" 
                    android:layout_width="fill_parent" android:layout_height="wrap_content"
                    android:id="@+id/L2">
                    <TextView android:text="Hollywood" android:id="@+id/address"
                        android:textSize="18sp" android:layout_marginTop="5dp" android:layout_gravity="center" 
                        android:layout_height="wrap_content" android:layout_width="wrap_content">
                    </TextView>
                </LinearLayout>
                <LinearLayout android:orientation="vertical" 
                    android:layout_width="fill_parent" android:layout_height="wrap_content"
                    android:id="@+id/L2">
                    <TextView android:text="DeadLine : closed 2011 festival"
                        android:id="@+id/date" android:textSize="18sp"
                        android:layout_marginTop="5dp" android:layout_gravity="center" android:layout_height="wrap_content"
                        android:layout_width="wrap_content">
                    </TextView>
                </LinearLayout>
                <LinearLayout android:orientation="vertical" 
                    android:layout_width="fill_parent" android:layout_height="wrap_content"
                    android:id="@+id/L2">
                    <TextView android:text="Genre" android:id="@+id/genre"
                        android:textSize="18sp" android:layout_marginTop="5dp"
                        android:layout_gravity="center" 
                        android:layout_height="wrap_content" android:layout_width="wrap_content">
                    </TextView>
                </LinearLayout>

            </LinearLayout>

            <RelativeLayout android:id="@+id/Relativelayoutadd" android:layout_height="wrap_content" android:layout_width="fill_parent"
                  android:layout_below="@+id/Lq1" android:layout_alignBaseline="@+id/flipper">                
            <TextView android:text="Add to IPhone calendar" android:id="@+id/calendar"
                android:textSize="15sp" android:layout_marginBottom="5dp"
                 android:layout_alignParentLeft="true"
                android:layout_height="wrap_content" android:layout_width="wrap_content">
            </TextView>
            <TextView android:text="Add to favorite" android:id="@+id/addtofavorite"
                android:textSize="15sp" android:layout_marginBottom="5dp"
                android:layout_alignParentRight="true"
                android:layout_height="wrap_content" android:layout_width="wrap_content">
            </TextView>        
            </RelativeLayout>

        </RelativeLayout>

    </ViewFlipper>

    <RelativeLayout android:layout_width="fill_parent"
        android:layout_gravity="bottom" android:layout_alignParentBottom="true"
        android:background="@drawable/applicarion_bar" android:layout_height="wrap_content"
        android:id="@+id/relativeLayout4">
        <ImageButton android:layout_width="wrap_content"
            android:layout_marginLeft="5dp" android:layout_height="wrap_content"
            android:id="@+id/detailfestivallist" android:layout_alignParentLeft="true"
            android:background="@drawable/festival_btn">
        </ImageButton>
        <ImageButton android:layout_width="wrap_content"
            android:layout_marginLeft="90dp" android:layout_height="wrap_content"
            android:id="@+id/detailsearch" android:layout_alignParentLeft="true"
            android:background="@drawable/search_btn">
        </ImageButton>
        <TextView android:layout_width="wrap_content" android:text="MAR 20"
            android:textSize="9sp" android:layout_marginLeft="170dp"
            android:layout_height="wrap_content" android:id="@+id/detailcalendar"
            android:layout_alignParentLeft="true" android:background="@drawable/calendar_btn">
        </TextView>
        <ImageButton android:layout_width="wrap_content"
            android:layout_marginRight="5dp" android:layout_height="wrap_content"
            android:id="@+id/detailfavorite" android:layout_alignParentRight="true"
            android:background="@drawable/favorite_btn">
        </ImageButton>
    </RelativeLayout>
</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-24T01:37:13+00:00Added an answer on May 24, 2026 at 1:37 am

    First, you have two different elements called android:id=”@+id/date”. This might give conflicts, and awkward behavior.

    Secondly, the android:id=”@+id/RLL” is only used to position items vertically. Therefore consider using a LinearLayout instead.

    In general, I think your layout uses too much containers. I’ve created another layout (and replaced the drawables with colours, since i don’t have the drawables) which you might use for inspiration to create a simpler, and flexible layout. As commented by Siva K, you can use the android:layout_weight=”1″ for the elements in the center (in the LinearLayout) to space them evenly…

    Below is an example (only the viewFlipper part, the rest is unchanged)

    <ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_below="@+id/relativeLayout2" android:layout_above="@+id/relativeLayout4"
        android:id="@+id/flipper" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    
        <RelativeLayout
            android:id="@+id/RLL"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
    
            <!--  HEADER IMAGE -->
            <ImageView android:layout_height="wrap_content"
                android:layout_width="wrap_content" android:id="@+id/imageView1"
                android:src="#ff5500" android:layout_alignParentTop="true"
                android:layout_centerHorizontal="true">
            </ImageView>
    
            <!-- TOP -->
            <TextView android:text="Detail" android:id="@+id/textView1"
                android:background="#ff0022" android:textSize="15sp"
                android:layout_centerInParent="true" android:gravity="center"
                android:maxLines="2" android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_below="@id/imageView1">
            </TextView>
            <ImageButton android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:id="@+id/detailback"
                android:layout_alignParentLeft="true" android:background="#112233"
                android:layout_alignTop="@id/textView1">
            </ImageButton>
            <ImageButton android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:id="@+id/DetailShare"
                android:layout_alignParentRight="true" android:background="#55ff22"
                android:layout_alignTop="@id/textView1">
            </ImageButton>
    
            <!--  MIDDLE -->
            <LinearLayout 
                android:id="@+id/ll"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_below="@id/textView1" 
                android:orientation="vertical"
                android:layout_marginBottom="20dp">
                <TextView android:text="date" android:id="@+id/date"
                    android:textSize="18sp" android:layout_marginTop="5dp"
                    android:layout_gravity="center" 
                    android:layout_height="wrap_content" 
                    android:layout_width="wrap_content"
                    android:layout_centerHorizontal="true" android:layout_weight="1">
                 </TextView>
                 <TextView android:text="Contact : " android:id="@+id/contact"
                    android:textSize="18sp" android:layout_marginTop="5dp"
                    android:layout_gravity="center" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:layout_centerHorizontal="true" android:layout_weight="1">
                </TextView>
                <TextView android:text="mail" android:id="@+id/mail"
                    android:textSize="18sp" android:layout_marginTop="5dp"
                    android:layout_gravity="center" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:layout_centerHorizontal="true" android:layout_weight="1">
                </TextView>
                <TextView android:text="phone" android:id="@+id/phone"
                    android:textSize="18sp" android:layout_marginTop="5dp"
                    android:layout_gravity="center"
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:layout_centerHorizontal="true" android:layout_weight="1">
                </TextView>
                <TextView android:text="Hollywood" android:id="@+id/address"
                    android:textSize="18sp" android:layout_marginTop="5dp" android:layout_gravity="center" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:layout_centerHorizontal="true" android:layout_weight="1">
                </TextView>
                <TextView android:text="DeadLine : closed 2011 festival"
                    android:id="@+id/date2" android:textSize="18sp"
                    android:layout_marginTop="5dp" android:layout_gravity="center" android:layout_height="wrap_content"
                    android:layout_width="wrap_content"
                    android:layout_centerHorizontal="true" android:layout_weight="1">
                </TextView>
                <TextView android:text="Genre" android:id="@+id/genre"
                    android:textSize="18sp" android:layout_marginTop="5dp"
                    android:layout_gravity="center" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:layout_centerHorizontal="true" android:layout_weight="1">
                </TextView>
            </LinearLayout>
    
            <!--  BOTTOM -->
            <TextView android:text="Add to IPhone calendar" android:id="@+id/calendar"
                android:textSize="15sp" android:layout_marginBottom="5dp"
                android:layout_alignParentLeft="true"
                android:layout_height="wrap_content" android:layout_width="wrap_content"
                android:layout_alignParentBottom="true">
            </TextView>
            <TextView android:text="Add to favorite" android:id="@+id/addtofavorite"
                android:textSize="15sp" android:layout_marginBottom="5dp"
                android:layout_alignParentRight="true"
                android:layout_height="wrap_content" android:layout_width="wrap_content"
                android:layout_alignParentBottom="true">
            </TextView>
        </RelativeLayout>
    </ViewFlipper>
    

    Hope this works for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tab-bar and navigation controller application (like Youtube app or Contacts app).
I have to implement a tab bar based application. There are two requirements The
I have an app which has split view inside a tab bar, and these
I have a tab bar application and when I display a modal view controller,
I have a Tab Bar application with four new headers, implementation and interface files,
I have a Tab bar application having 6 tabs. When I debug and runthe
I have a tab bar application with three tabs. In my second tab view
I have a Tab Bar application for iPad, created using the basic Tab Bar
I am building a Tab Bar App and have a MapView set up on
I have an iPhone application that's using Navigation Controller to display the top bar

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.