MCPcopy
hub / github.com/Bearded-Hen/Android-Bootstrap

github.com/Bearded-Hen/Android-Bootstrap @2.3.1 sqlite

repository ↗ · DeepWiki ↗ · release 2.3.1 ↗
554 symbols 1,350 edges 65 files 167 documented · 30%
README

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:

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

You should also override your application class with the following:

java 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

<img src="https://raw.github.com/Bearded-Hen/Android-Bootstrap/master/images/bootstrap_button.png" width="450" alt="BootstrapButton">

###BootstrapButtonGroup
Allows BootstrapButtons to be grouped together and their attributes controlled en masse.
   ```xml
<com.beardedhen.androidbootstrap.BootstrapButtonGroup
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="BootstrapButtonGroup"
    android:orientation="vertical"
    app:bootstrapBrand="success"
    app:bootstrapSize="lg"
    app:roundedCorners="true"
    >
    <com.beardedhen.androidbootstrap.BootstrapButton
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="BootstrapButton 1"
       />
    <com.beardedhen.androidbootstrap.BootstrapButton
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="BootstrapButton 2"
       />
</com.beardedhen.androidbootstrap.BootstrapButtonGroup>

BootstrapButtonGroup

AwesomeTextView

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

<img src="https://raw.github.com/Bearded-Hen/Android-Bootstrap/master/images/awesome_text_view.png" width="450" alt="AwesomeTextView">

###BootstrapProgressBar
Displays progress in a bar from 0-100, and animates updates to the current progress.
   ```xml
<com.beardedhen.androidbootstrap.BootstrapProgressBar
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:animated="true"
    app:bootstrapBrand="warning"
    app:progress="78"
    app:striped="true"
    />

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="success"
            app:bootstrapProgress="20"
            />

        <com.beardedhen.androidbootstrap.BootstrapProgressBar
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:bootstrapBrand="danger"
            app:bootstrapProgress="20"
            />

        </com.beardedhen.androidbootstrap.BootstrapProgressBarGroup>
<img src="https://raw.github.com/Bearded-Hen/Android-Bootstrap/master/images/bootstrap_progress_bar_group.png" width="450" alt="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"
    />

BootstrapLabel

BootstrapEditText

Allows editing of text in a widget themed using BootstrapBrand. ```xml

<img src="https://raw.github.com/Bearded-Hen/Android-Bootstrap/master/images/bootstrap_edit_text.png" width="450" alt="BootstrapEditText">

###BootstrapCircleThumbnail
Displays images in a center-cropped Circular View, themed with BootstrapBrand.
   ```xml
<com.beardedhen.androidbootstrap.BootstrapCircleThumbnail
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="https://github.com/Bearded-Hen/Android-Bootstrap/raw/2.3.1/@drawable/my_drawable"
    app:bootstrapBrand="danger"
    app:hasBorder="true"
    />

BootstrapCircleThumbnail

BootstrapThumbnail

Displays images in a rectangular View, themed with BootstrapBrand. ```xml

<img src="https://raw.github.com/Bearded-Hen/Android-Bootstrap/master/images/bootstrap_thumbnail.png" width="450" alt="BootstrapThumbnail">

###BootstrapWell
Displays a view in a themed container.

```xml
<com.beardedhen.androidbootstrap.BootstrapWell
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_margin="8dp"
        app:bootstrapSize="xl">

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

BootstrapWell

BootstrapDropDown

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

<com.beardedhen.androidbootstrap.BootstrapDropDown
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="8dp"
                app:bootstrapText="Medium {fa_thumbs_o_up}"
                app:bootstrapBrand="regular"
                app:roundedCorners="true"
                app:bootstrapSize="md"
                app:dropdownResource="@array/bootstrap_dropdown_example_data"
                app:bootstrapExpandDirection="down"/>

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.

```java

 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 support@beardedhen.com, 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!

Extension points exported contracts — how you extend this code

IconSet (Interface)
Specifies the icon codes for a Typeface, and provides the filename of the font so that it can be initialised [6 implementers]
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/font/IconSet.java
BootstrapBrandView (Interface)
Views which implement this interface change their color according to the given Bootstrap Brand [12 implementers]
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/view/BootstrapBrandView.java
OutlineableView (Interface)
Views which implement this interface allow the user to specify whether the view should be displayed as an outline or not [6 …
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/view/OutlineableView.java
BootstrapSizeView (Interface)
Classes which implement this interface allow aspects of their view to be scaled by a float factor. For example, a Button [12 …
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/view/BootstrapSizeView.java
RoundableView (Interface)
Views which implement this interface allow the user to specify whether the view should have rounded corners or not. The [16 …
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/view/RoundableView.java

Core symbols most depended-on inside this repo

setBootstrapBrand
called by 54
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/view/BootstrapBrandView.java
resolveColor
called by 33
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/utils/ColorUtils.java
pixelsFromDpResource
called by 28
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/utils/DimenUtils.java
scaleFactor
called by 19
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/defaults/DefaultBootstrapSize.java
dpToPixels
called by 16
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/utils/DimenUtils.java
retrieveChild
called by 14
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapProgressBarGroup.java
getBootstrapBrand
called by 13
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/view/BootstrapBrandView.java
getColor
called by 13
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/api/attributes/BootstrapBrand.java

Shape

Method 483
Class 46
Interface 17
Enum 8

Languages

Java100%

Modules by API surface

AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapProgressBar.java37 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapButton.java31 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapDropDown.java28 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapProgressBarGroup.java23 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapAlert.java22 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/AwesomeTextView.java22 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapButtonGroup.java21 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapBaseThumbnail.java21 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapDrawableFactory.java20 symbols
sample/src/main/java/com/fractalwrench/androidbootstrap/sample/HomeActivity.java16 symbols
sample/src/main/java/com/fractalwrench/androidbootstrap/sample/BootstrapProgressBarExample.java14 symbols
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/BootstrapGroup.java14 symbols

For agents

$ claude mcp add Android-Bootstrap \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact