Android fragment tab host + viewpager swipe?

后端 未结 4 933
一向
一向 2020-12-30 17:38

I currently have a fragment tab host, made by this tutorial http://maxalley.wordpress.com/2013/05/18/android-creating-a-tab-layout-with-fragmenttabhost-and-fragments/

<
4条回答
  •  悲&欢浪女
    2020-12-30 18:09

    Inorder to include viewpager library to the project ,you should import the library
    "Existing Project” to your current one.

    Step 1:-Download source code from GitHub.(https://github.com/JakeWharton/Android-ViewPagerIndicator)

    Step2 :-In your Android Studio Project: File -> Project Structure -> add (+ symbol) -> Import Existing Project. Import just the folder called ”library”, not the entire project (leave the import options as Android Studio suggests).

    step 3:-If the "compileSdkVersion" specified in your build.gradle doesn’t match with the one specified in the Android-ViewPagerIndicator project, change the second one. The same apply with any other property, such as "minSdkVersion" or even the current support library.

    Step 4:-Add Android-ViewPagerIndicator project as a dependency to your build.gradle module: dependencies { compile project(':library') }

    Step 5:- Sync project with gradle files.

提交回复
热议问题