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

I found out why (well, how to solve this) this is happening.
it’s because of the
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.
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…