Question

In my app Im using Jake Wharton's TitlePageIndicator.I want to know whether we can set typeface to TitlepagerIndicator.

Here is the xml,

<com.viewpagerindicator.TitlePageIndicator
     android:id="@+id/indicatortitle"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_marginBottom="10dp"
     android:padding="10dip"
     app:selectedColor="#000"
     android:textColor="#a0a0a0"
     android:textSize="25dp" />

and in Main activity,

    TitlePageIndicator indicator = (TitlePageIndicator)findViewById(R.id.indicatortitle);
indicator.setViewPager(mViewPager);
    indicator.setFooterIndicatorStyle(IndicatorStyle.Triangle);
Was it helpful?

Solution

If you look at the code TitlePageIndicator.java you'll see that it extends View and overrides the setTypeface() method, so YES.

just do: indicator.setTypeface(your_typeface);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top