Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bootstrap style widgets for Android, with Glyph Icons

License

NotificationsYou must be signed in to change notification settings

Bearded-Hen/Android-Bootstrap

Repository files navigation

Android Bootstrap is an Android library which provides custom views styled according to theTwitter Bootstrap Specification. This allows you to spend more timeon 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 CentralCircleCI

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:

publicclassSampleApplicationextendsApplication {@OverridepublicvoidonCreate() {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 onGoogle Play.

Support

If you have a question about how to use the project, please ask a question onStackOverflow, using the tagandroid-bootstrap-widgets.

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

Javadoc

The javadoc for the project is hosted onGithub.

Examples

BootstrapButton

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

<com.beardedhen.androidbootstrap.BootstrapButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="BootstrapButton"app:bootstrapBrand="success"app:bootstrapSize="lg"app:buttonMode="regular"app:showOutline="false"app:roundedCorners="true" />

BootstrapButton

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

<com.beardedhen.androidbootstrap.BootstrapButtonGroupandroid: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.BootstrapButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="BootstrapButton 1"    /> <com.beardedhen.androidbootstrap.BootstrapButtonandroid: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.

<com.beardedhen.androidbootstrap.AwesomeTextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"app:bootstrapBrand="success"app:fontAwesomeIcon="fa_android" />

AwesomeTextView

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

<com.beardedhen.androidbootstrap.BootstrapProgressBarandroid: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 ofstacked progress bar.

     <com.beardedhen.androidbootstrap.BootstrapProgressBarGroupandroid:id="@+id/example_progress_bar_group_round_group"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_gravity="center_vertical"app:bootstrapSize="md"app:bootstrapMaxProgress="100">         <com.beardedhen.androidbootstrap.BootstrapProgressBarandroid:layout_width="0dp"android:layout_height="wrap_content"app:bootstrapBrand="success"app:bootstrapProgress="20"             />         <com.beardedhen.androidbootstrap.BootstrapProgressBarandroid:layout_width="0dp"android:layout_height="wrap_content"app:bootstrapBrand="danger"app:bootstrapProgress="20"             />         </com.beardedhen.androidbootstrap.BootstrapProgressBarGroup>

BootstrapProgressBarGroup

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

<com.beardedhen.androidbootstrap.BootstrapLabelandroid: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.

<com.beardedhen.androidbootstrap.BootstrapEditTextandroid:layout_width="wrap_content"android:layout_height="wrap_content"app:bootstrapSize="md"app:bootstrapBrand="info" />

BootstrapEditText

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

<com.beardedhen.androidbootstrap.BootstrapCircleThumbnailandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/my_drawable"app:bootstrapBrand="danger"app:hasBorder="true" />

BootstrapCircleThumbnail

BootstrapThumbnail

Displays images in a rectangular View, themed with BootstrapBrand.

<com.beardedhen.androidbootstrap.BootstrapThumbnailandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/my_drawable"app:bootstrapBrand="info"app:hasBorder="true" />

BootstrapThumbnail

###BootstrapWellDisplays a view in a themed container.

<com.beardedhen.androidbootstrap.BootstrapWellandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_gravity="center"android:layout_margin="8dp"app:bootstrapSize="xl">        <TextViewandroid: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

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

<com.beardedhen.androidbootstrap.BootstrapDropDownandroid: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 implementsBootstrapBrand, and setting it on the View. Please see the sample code of BootstrapButton for more detail.

classCustomBootstrapStyleimplementsBootstrapBrand {// specify desired colors here    }BootstrapButtonbtn =newBootstrapButton(context);btn.setBootstrapBrand(newCustomBootstrapStyle(this);

Contributing

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

  1. Add more Icon Typefaces, using the instructionshere
  2. Help implement views which are present in theTwitter 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 usesSemantic 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 Bootstraptweet us at@BeardedHen, emailsupport@beardedhen.com,or head over to ourwebsite to see more of our creations.

Hall of Fame

CheckoutAppBrain to see some of the apps which use Android Bootstrap!


[8]ページ先頭

©2009-2025 Movatter.jp