Home

Awesome

Android SocialButtons

An android library for implementing login/share buttons easily for social networks.

As of now, this is only a UI library. This library does not provide any social network functionality. That you have to code yourself.

Paypal Donate

Build Status Release Android Arsenal

Screenshots

<img src="/screenshots/screen1.png" width="300"/> <img src="/screenshots/screen2.png" width="300"/> <img src="/screenshots/screen3.png" width="300"/>

How to use

Include the library

You can either download the source or add to gradle via jitpack.io Add jitpack to your dependencies (in the main project folder) -

 repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }

And include the library in your dependencies (in app folder)

 dependencies {
        compile 'in.championswimmer:Android-SocialButtons:1.3'
    }

Floating Action Buttons

Usage

To use FloatingActionButtons, (for example a Facebook button), use the FABFacebook component

        <in.championswimmer.libsocialbuttons.fabs.FABSocial
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="7dp"
            app:social="facebook"
             />

Customizations

Other than the color and the icon, everything else can be changed using the usual xml attributes. android:src, android:backgroundTint will have no effect even if you set them in your layout xml.

Buttons

Usage

Usual Button is also available. To use, for example a Twitter button, use the following in your xml

    <in.championswimmer.libsocialbuttons.buttons.BtnSocial
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:text="Follow on Twitter"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:social="twitter"
         />

Customizations

You have to set your own text using the android:text attribute. While the Button has it's own style predefined, you can still override the following via xml attributes -

You cannot set android:drawableLeft and the other Right, Top, Bottom drawbles.

NOTE: If you chose to you can set no text, and you'll just get a square button with a social icon in it

Credits

License

This software is licensed under the Apache License V2.0 A copy can be found here