1

I have three fonts in a listView, whichever the user selects it has to effect the textView in the Pager. But, it is not updating the font in that position of the ViewPager. It is getting updated after moving to one or two slides/pages. Please help me, Thanks.

public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        ViewGroup rootView = (ViewGroup) inflater.inflate(
                R.layout.fragment_main, container, false);

     // Set Slide Object Value
       TextView mDesc = (TextView)rootView.findViewById(R.id.textTitle);
        m_txTitle.setTypeface(SettingsABC.getTypeface(fontStyle));
fontStyle = Typeface.createFromAsset(getAssets(), "cookies.ttf");
mDesc.setTypeface(fontStyle);
}
  • set the TextView which you want to look like as "cookies.ttf" in every page – CompEng Apr 30 '14 at 12:55
  • See my answer here for a better approach that you can apply without individually setting it: http://stackoverflow.com/a/23135917/1426565 – Cruceo Apr 30 '14 at 17:51

0 Answers0