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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:05:13+00:00 2026-06-09T11:05:13+00:00

I use a RelativeLayout with some TextView one below another and at the end

  • 0

I use a RelativeLayout with some TextView one below another and at the end a ViewPager.

the ViewPager have android:layout_below=”@id/dialog_access_right” in his parameters , dialog_access_right is the last TextView .

My issue is that this particular TextView CAN (but not necessarily) be multiline (max 3). But the ViewPager is always positioned after the first line so it hide the rest of the TextView.

I tried using multiline, set line parameters to 3 (not too bad if there is two blank line in some cases), put a default text with two newline.
Nothing of this work.

is there a way to tell the ViewPager to redraw and align itself (i tried invalidate on the relativelayout, but nothing…) with the view above ?

<TextView
    android:id="@+id/dialog_access_right"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@id/access_right_title"
    android:layout_alignBottom="@id/access_right_title"
    android:layout_toRightOf="@id/access_right_title"
    android:text="@string/dialog_access_right" />

<android.support.v4.view.ViewPager
    android:id="@+id/viewpager"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@id/dialog_access_right" />

edit:here’s a screenshot to show my issue, the “Can Read” TextView is in reality a multiline TextView with 2 lines (can be 3), the blue line is a PagerTabStrip inside the ViewPager
screenshot

  • 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-09T11:05:14+00:00Added an answer on June 9, 2026 at 11:05 am

    I found out why (well, how to solve this) this is happening.

    it’s because of the

        android:layout_alignBottom="@id/access_right_title"
    

    it’s seem that this parameters is the culprit.When i remove it (the layout_alignBaseline too) and replace it with another parameter (android:layout_below in this case) the ViewPager is right positioned.

    <TextView
        android:id="@+id/dialog_access_right"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/last_modified_date_name"
        android:layout_toRightOf="@+id/access_right_title"
        android:text="TextView" />
    
    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@id/dialog_access_right" />
    

    I don’t know if this is a bug or something wanted but even if in my case the android:layout_below does the job , it’s may not always be…

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

Sidebar

Related Questions

In my Android App Activity, I have a RelativeLayout with one ImageView and a
I have to dynamically add a list of views (the views use RelativeLayout). Can
I have created one gridview and use custom adapter for that. I added two
i have in xml tis code: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/mainLayout android:layout_width=wrap_content android:layout_height=wrap_content> <Button android:id=@+id/examp1 android:layout_width=wrap_content
I have a simple LinearLayout with one TextView and one ImageView. I want the
I have the following 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> <GridView android:id=@+id/grid
I'm starting to use RelativeLayout more and more but there are some things I
I have the following layout in my xml file: <RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent> <FrameLayout android:id=@+id/logoLayout
I'm having some difficulty working with buttons and images. I have 2 buttons, one
I have an application which uses ViewPager. Inside the ViewPager I don't use Fragments,

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.