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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:30:16+00:00 2026-06-04T20:30:16+00:00

Using the latest Android Support Package v4 (December 2011), I’m trying to implement a

  • 0

Using the latest Android Support Package v4 (December 2011), I’m trying to implement a ViewPager with a PagerTitleStrip to show the title of the three panes in my UI.

I’ve read the sparse docs and successfully created the title strip at the top of my view, using the following XML:

<android.support.v4.view.ViewPager
    android:id="@+id/mypager"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" >

    <android.support.v4.view.PagerTitleStrip
              android:layout_gravity="top"
              android:id="@+id/titlestrip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:duplicateParentState="true" />
</android.support.v4.view.ViewPager>

However, my view now has a “gap” at the bottom of the layout, with height precisely the same as the title strip. If I increase the size of the title strip at the top of the UI, the gap at the bottom of my view also enlarges. It’s as if there is a bug in PagerTitleStrip which is incorrectly placing the title strip at both the top and the bottom, even though it’s only displaying it at the top.

If I set layout_gravity to “bottom” instead of top, the strip shows correctly, i.e. at the bottom of the view without any strange artifacts at the top. And if I remove the title strip, the gap disappears.

Anyone have a solution to this, or seen it in their code as well?

  • 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-04T20:30:17+00:00Added an answer on June 4, 2026 at 8:30 pm

    When you add views to your view pager in instantiateItem, make sure you call addView(view), NOT addView(view, 0).

    This fixed this issue for me.

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

Sidebar

Related Questions

In my android app i am using Latest Geoloqi API to implement Geofence concept.when
I'm using the latest NuGet package of Fluent NHibernate (1.3.0.727), but I'm still experiencing
I'm using android-mips-ndk-r5b-windows and latest sdk , I'm targeting Android 2.2 cygwin 1.79 the
I'm trying to create an Android app in Java (using Ubuntu 11.10 with the
I'm using Eclipse to develop Android apps. I'm using the latest SDK and Eclipse
I developed my app using Mono for Android. I have the latest version 4.0.3.
I am using EGit in eclipse to provide Git support for an Android project
What's the current status of using the latest version of the Android ADT with
Are the following actions possible using the latest version of the Android API?: Temporarily
I'm using the Android plugin for Eclipse on OSX, latest versions of everything. When

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.