Search code examples
android-studioandroid-viewandroid-custom-view

Importing a custom view in Android Studio


I've seen plenty of links that tell me how to create a custom view, but how how do you import an already existing one. I downloaded one and it looks like a whole project. How is it implemented into another project?


Solution

    1. Import it as a module via File -> Import Module
    2. Add as a dependency to your project. File -> Project Structure -> Your Module -> Dependencies Tab -> Add -> Module Dependency.
    3. Include in your settings.gradle via include ':module name'
    4. Clean & Build