Note that there are some explanatory texts on larger screens.

plurals
  1. POonfling indicator in viewpager android
    primarykey
    data
    text
    <p>I am developing an android application in which I am using Tablerow with viewpagerAdapter. I need to add an indicator as the user swipes from one page to the other,for which I want to add an horizontal line, just as shown in the image below.</p> <p><a href="http://imgur.com/ZTD7w0e" rel="nofollow">http://imgur.com/ZTD7w0e</a></p> <p>I tried adding the Image(Horizontal line),it fits all the 3 tabs instead of just tab1 </p> <p>Here is the code:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/white" android:orientation="vertical" &gt; &lt;TableLayout style="@style/layout_f_w" android:stretchColumns="*" &gt; &lt;TableRow android:id="@+id/tableRow1" style="@style/layout_wrap" android:background="#dddddd" android:clickable="true" &gt; &lt;!-- First Tab --&gt; &lt;LinearLayout android:id="@+id/first_text" style="@style/layout_f_w" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/textView1" style="@style/text_title" android:text="Tab1" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/second_text" style="@style/layout_f_w" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/textView1" style="@style/text_title" android:text="Tab2" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/third_text" style="@style/layout_f_w" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/textView1" style="@style/text_title" android:text="Tab3" /&gt; &lt;/LinearLayout&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;include android:layout_width="fill_parent" android:layout_height="wrap_content" layout="@layout/indicator" /&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/h_line" /&gt; &lt;android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="fill_parent" android:layout_height="fill_parent" /&gt; </code></pre> <p></p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload