Skip to content

CafeDroid/Android-SocialButtons

 
 

Repository files navigation

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.

Build Status Release Android Arsenal

Screenshots

How to use

Include the library

You can either download the source or add to gradle via jitpack.io Add jitpack to your dependencies -

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

And include the library in your dependencies

 dependencies {
        compile 'com.github.championswimmer:Android-SocialButtons:1.0'
    }

Floating Action Buttons

Usage

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

        <in.championswimmer.libsocialbuttons.fabs.FABFacebook
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="7dp" />

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.

The FABs are extended from com.melnykov.fab.FloatingActionButton So all the features of Melnykov Oleksandr's FloatingActionButton library are inherently available here as well.

Buttons

Usage

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

    <in.championswimmer.libsocialbuttons.buttons.BtnTwitter
        android:text="Follow on Twitter"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

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 -

  • android:textAllCaps (Default: false)
  • android:font-family and android:textStyle (Default: sans-serif-ligt normal)
  • android:textSize (Default: 24sp)
  • android:padding (Default: 15dp)
  • android:drawablePadding (Default: 15dp)

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

About

A library for easily implementing social login/share buttons

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%