Android Question Amir Fragment and TabStrip

Discussion in 'Android Questions' started by asales, Feb 21, 2019.

  1. asales

    asales Well-Known Member Licensed User

    I use this library from @alimanam3386 :
    https://www.b4x.com/android/forum/threads/amir_fragment.101189/

    There are an example with AHViewer Page.

    I tried to modify the example to use TabStrip ViewPager, but I get this error in compile:
    Code:
    PagerAdapter.IntoViewPager(TabStrip1,True)
    javac 
    1.8.0_92
    src\b4a\example\AFTabStrip\main.java:
    349: error: incompatible types: TabStripViewPager cannot be converted to ViewPager
    mostCurrent._vv2.IntoViewPager((android.support.v4.view.ViewPager)(mostCurrent._tabstrip1),anywheresoftware.b4a.keywords.Common.True);
    The signature of the method IntoViewPager is:
    Code:
    IntoViewPager(ViewPager As android.support.v4.view.ViewPager, RemoveLastAdapter As Boolean)
    Anyone has tried this?
    Is possible to use other ViewPager or only the AHViewPager?

    Thanks in advance.
     
  2. alimanam3386

    alimanam3386 Active Member Licensed User

    Tabstrip is not extend from android.support.v4.view.ViewPager so you can not use it in this way.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice