Android Studion using Android-viewpagerindicator

Source: Internet
Author: User

Android-viewpagerindicator function does not introduce, want to see the click to see. Because not will not import, took a lot of time, now record, if just need, and just see, that reference.

1. Using MAVEN Import

1) Add the following code to the top-level build.gradle:

Buildscript {

repositories {

Maven {URL "Http://dl.bintray.com/populov/maven"}

Mavencentral ()

}

dependencies {

Classpath ' com.android.tools.build:gradle:0.12.+ '

}

}


allprojects {

repositories {

Maven {URL "Http://dl.bintray.com/populov/maven"}

Mavencentral ()

}

}


2) Add in your own app's Build.gradle

compile ' com.viewpagerindicator:library:2.4.1 '

Later you want to add a third-party library, only need to search in the http://search.maven.org/, and then add in the 2nd on the line.


2. Download the good source code and add the source code that has been downloaded:


#1 Download Source code

#2 Import Existing Project, add (+ symbol), Project Structure, Android Studio project:file. K Just import the library folder instead of the entire project (leave the import options as Android Studio suggests).

# 3 Follow the steps set (SDK version), then next

# 4 Add dependencies to your app's Build.gradleDependencies{Compile Project(': library ')}


Note: If you already have support-v4 in the project, you need to remove it because the Android-viewpagerindicator added will contain this library. There can be no more than two such libraries in a project (the project will share this jar in the library). If the support-v4 in Android-viewpagerindicator Library can not meet your requirements, it can only be used in the 2nd way, after downloading, the support-v4 you want to replace the library folder, and then follow the steps.



Android Studion using Android-viewpagerindicator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.