Android-Bootstrap

by Bearded-Hen

Bearded-Hen / Android-Bootstrap

Bootstrap style widgets for Android, with Glyph Icons

7.2K Stars 1.5K Forks Last release: almost 4 years ago (2.3.1) MIT License 338 Commits 5 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Android-Bootstrap

Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This allows you to spend more time on development rather than trying to get a consistent theme across your app, especially if you are already familiar with the Bootstrap Framework.

Quick Start

Maven Central CircleCI

Add the following dependency to your build.gradle, ensuring you replace 'X.X.X' with the latest version on the button above:

 dependencies {
    compile 'com.beardedhen:androidbootstrap:{X.X.X}'
 }

You should also override your application class with the following:

 public class SampleApplication extends Application {
     @Override public void onCreate() {
         super.onCreate();
         TypefaceProvider.registerDefaultIconSets();
     }
 }

You should then checkout the library and investigate the sample code, which covers most of the features. The sample app is also available on Google Play.

Support

If you have a question about how to use the project, please ask a question on StackOverflow, using the tag android-bootstrap-widgets.

If you think you have found a bug in the library, you should create a new issue instead.

Javadoc

The javadoc for the project is hosted on Github.

Examples

BootstrapButton

A button that supports Glyph icons, and is themeable using Bootstrap Brands.

xml

BootstrapButton

BootstrapButtonGroup

Allows BootstrapButtons to be grouped together and their attributes controlled en masse.

xml

    
    

BootstrapButtonGroup

AwesomeTextView

A text widget that displays Glyph icons, and is themeable using Bootstrap Brands.

xml

AwesomeTextView

BootstrapProgressBar

Displays progress in a bar from 0-100, and animates updates to the current progress.

xml

BootstrapProgressBar

BootstrapProgressBarGroup

Allows BootstrapProgressBars to be group together to have the effect of stacked progress bar. ```xml

        

    <com.beardedhen.androidbootstrap.bootstrapprogressbar android:layout_width="0dp" android:layout_height="wrap_content" app:bootstrapbrand="danger" app:bootstrapprogress="20"></com.beardedhen.androidbootstrap.bootstrapprogressbar>

BootstrapProgressBarGroup

###BootstrapLabel Displays non-clickable text in a widget similar to the BootstrapButton, sizable using H1-H6 elements.

```xml <com.beardedhen.androidbootstrap.bootstraplabel android:layout_width="wrap_content" android:layout_height="wrap_content" app:bootstrapbrand="primary" app:bootstrapheading="h3" app:roundedcorners="true" android:text="Bootstrap Label"></com.beardedhen.androidbootstrap.bootstraplabel>

BootstrapLabel

BootstrapEditText

Allows editing of text in a widget themed using BootstrapBrand.

xml

BootstrapEditText

BootstrapCircleThumbnail

Displays images in a center-cropped Circular View, themed with BootstrapBrand.

xml

BootstrapCircleThumbnail

BootstrapThumbnail

Displays images in a rectangular View, themed with BootstrapBrand.

xml

BootstrapThumbnail

BootstrapWell

Displays a view in a themed container.

    <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:text="Look, I'm in a large well!"></textview>
</com.beardedhen.androidbootstrap.bootstrapwell>

BootstrapWell

BootstrapDropDown

Displays a view with dropdown options, supplied by an array of strings.


BootstrapDropdown

Custom Styles

Custom styles can be applied to any of the views in this library by creating a class which implements BootstrapBrand, and setting it on the View. Please see the sample code of BootstrapButton for more detail.

     class CustomBootstrapStyle implements BootstrapBrand {
         // specify desired colors here
     }

 BootstrapButton btn = new BootstrapButton(context);
 btn.setBootstrapBrand(new CustomBootstrapStyle(this);

Contributing

Contributions are very welcome! There are 3 main ways you can help out:

  1. Add more Icon Typefaces, using the instructions here
  2. Help implement views which are present in the Twitter Bootstrap Specification but are not yet in this library.
  3. Raise an issue if you see a bug or are unsure on how something works, or even better - send a pull-request with a fix!

Versioning

This project uses Semantic Versioning. There are several breaking changes in V2.X of the library, including:

  • AwesomeTextView replaces FontAwesomeText
  • Various altered method signatures/attributes for views
  • Global BootstrapBrand/BootstrapSize attributes replace view-specific enums

Please consider what effect these changes might have on your app before upgrading!

Contact

If you have any questions, issues, or just want to let us know where you're using Android Bootstrap tweet us at @BeardedHen, email [email protected], or head over to our website to see more of our creations.

Hall of Fame

Checkout AppBrain to see some of the apps which use Android Bootstrap!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.