Git Product home page Git Product logo

android-bootstrap's People

Contributors

andersonmat avatar andybeardedhen avatar bryant1410 avatar ebuildy avatar fractalwrench avatar intrications avatar jamie-beardedhen avatar joshuapinter avatar k-ni-ght avatar keyboardsurfer avatar knightkill avatar luohaha avatar lzyzsd avatar mkuklis avatar msneujink avatar pelli23 avatar petehendryhen avatar thedazzler avatar tom-beardedhen avatar wendly avatar yongjhih avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-bootstrap's Issues

BootstrapCircleThumbnail with a fontawesome icon

It would be nice to display a fontawesome icon in the circle thumbnail.
I started to implement that, but the layout of the component make it difficult (especially because of the dimensionsLabel).

Is this feature planned ?

BootstrapCircleThumbnail Error parsing XML: unbound prefix

hello
i'm trying to integrate the BootstrapCircleThumbnail on my list item , but when i call it i get this error error: Error parsing XML: unbound prefix.

Here is my code

            <com.beardedhen.androidbootstrap.BootstrapCircleThumbnail
                android:id="@+id/txt_long_desc"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                bootstrap:bct_image="@drawable/ic_taxi_detail_phone"
                bootstrap:bct_size="large" />
     </LinearLayout>

BootstrapButton

Hi there,

Just had a few questions:

Why does the BootstrapButton not extend the Button class? Wouldn't this make more sense since people who have existing code with buttons only have to change the layout and all their function calls to their buttons still work.

Perhaps I am missing something?

Thanks.

BootstrapEditText about android:textAppearance

Thank you for your great work

I wanna change the size of the words in the BootstrapEditText, but it seems that the textAppearance is not work.
Forgive my poor English.
Keep the great work.

Gradient Buttons

I'm making a new issue for each feature I added to discuss it because I added too many features at once in my fork. Here are the gradient buttons I added:

2013-12-12 03 28 44
2013-12-12 03 28 21

To use a gradient button, you just set the attribute "gradient" to true in xml. There are gradient square buttons as well, just not pictured

Using with ActionBarSherlock error

Using Android-Bootstrap with actionBarSherlock gives this error as soon as bootstrap is added to main project.
error message: actionbarsherlock\res\values\abs__attrs.xml:217: error: Attribute "icon" has already been defined

I renamed the name "icon" in attrs.xml to "bootstrap_icon" to get it to work in my project. This might be something that needs changing

Android support v4 conflict using maven central

Hey there!

Thanks for integrating with maven, but currently, i am getting a duplicate dex file for the android support library. I tried to remove the support dependency in gradle

compile ('com.beardedhen:androidbootstrap:+') {
exclude module: 'support-v4'
}

but I realized after looking into the repo that the android support jar was included directly into the libs directly. Anyway, you could change that so that support-v4 is a dependency vs a included jar?

button oddly stretched after updating the library

After updating the library from April to today's version, button suddenly takes up the full screen
2-tile

<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
    >


    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingTop="5dp"
        >

        <com.beardedhen.androidbootstrap.BootstrapButton
            android:id="@+id/listButton1"
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            bootstrapbutton:bb_icon_left="fa-list-ol"
            bootstrapbutton:bb_type="default"
            android:paddingLeft="5dp"
            android:paddingRight="5dp"
            android:paddingBottom="5dp"
                       />
        <com.beardedhen.androidbootstrap.BootstrapButton           
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/listButton2"
            android:layout_gravity="center_horizontal"
            bootstrapbutton:bb_icon_left="fa-road"
            bootstrapbutton:bb_type="default"
            android:paddingBottom="5dp"
            android:paddingRight="5dp"
             />     

    </LinearLayout>

    <ListView
        android:id="@+id/list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        />
</LinearLayout>

Styles and Theme

This feature probably needs the most discussion and it really is for the benefit of the developer rather than the user. I added styles for BootstrapButton and BootstrapEditText.
Advantages:

  1. You can specify defaults without going into the class code. For example,
    <style name="BootstrapButton" parent="android:style/Widget.Button"> <item name="android:padding">8dp</item> <item name="android:textSize">14sp</item> <item name="bb_roundedCorners">true</item> </style>

gives each BootstrapButton 8dp padding, 14sp font, and round corners by default. The user can override all these by just doing what he would normally do in the layout xml file. As you can see, custom attributes can be placed in here as well i.e "bb_roundedCorners". It is much easier for the developer to just change settings here than it is to go into the java code and change stuff.

It isn't a huge deal though because there aren't too many defaults to set for BootstrapButtons. But it may make it easier if more widgets get added.

Disadvantage:

  1. The user has to add this to his styles.xml file. He goes to where his theme is located and adds this:
    <item name="bootstrapButtonStyle">@style/BootstrapButton</item> <item name="bootstrapEditTextStyle">@style/BootstrapEditText</item>

So it would end up looking like this after the above 2 lines are added:
<style name="AppTheme" parent="AppBaseTheme"> <item name="bootstrapButtonStyle">@style/BootstrapButton</item> <item name="bootstrapEditTextStyle">@style/BootstrapEditText</item> </style>

I think it's a fair tradeoff, but if more widgets are added to Android Bootstrap with styles, you need to add each one like above. But in the end, it just ends up being a copy and paste by the user, so it will take less than 10 seconds.

I also removed the need for the user to have to download the FontAwesome font and put it into their project. So it evens out kind of. I am 50/50 on this feature. I think it's awesome for developers because it is easier to make changes. But without it, it is nice being able to remove 2 steps for the user in order to use the library (not having to putting font in project and not having to add the styles)

BootstrapCircleThumbnail is not displayed correctly

hello , i'm tryng to show an image on a BootstrapCircleThumbnail , but the image show's on the top of the thumbs . see the image ,

thumbs

her is my xml code , the image size is : 920x360
<com.beardedhen.androidbootstrap.BootstrapCircleThumbnail
android:id="@+id/img_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:layout_gravity="center_horizontal"
BootstrapCircleThumbnail:bt_image="@drawable/bg_articles_list_row_image_placeholder"
BootstrapCircleThumbnail:bct_size="large"/>

thanks

Spinner Support

Sry for my english, this is mora a question than an issue, its posible to use something like BootstrapEdittext in a spinner? or woud it be posible implement "BoostrapSpinner" ?

BootStrapButton click Problem

hi everyone,
i have some issue to use BootStarpButton onclickListner here is my code,when i run the app it's crushed.
BootstrapButton btn2=(BootstrapButton) findViewById(R.id.button2);
//btn2.setText("1111");
btn2.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View arg0) {
            // TODO Auto-generated method stub
            Intent nextscreen=new Intent(getActivity().getApplicationContext(),Mellipage.class);
            startActivity(nextscreen);

        }
    });

if anyone know how can i fix it pleas share it.

"fill_parent" not working for button

Usually fill_parent should occupy the entire parent width only. But in BootstrapButton it occupy the entire parent width and height

        <com.beardedhen.androidbootstrap.BootstrapButton
            android:id="@+id/registerComplaintGreviance"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:orientation="vertical"
            android:text="@string/register_complaint"
            bootstrapbutton:bb_roundedCorners="true"
            bootstrapbutton:bb_type="primary" /> 

[warn]Converting to string: TypedValue

im not sure what is problem.

my logcat shown this log :
[warn]Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090028}

and i found in gen R.class :
r=0x7f090028 is lblLeft Textview in BootstrapButton.java

how fix this warn?

Is windowNoTitle really needed in styles.xml?

Hi there

I've been trying to use Android-Bootstrap in my app, the buttons are great! But due to the windowNoTitle attribute in your styles.xml, apps with an ActionBar can't get one due to some code gimmick down the line in Android theming

Is this line necessary?

Thanks

Android Studio Preview Issue

There was an issue with maven plugin version of Android-Bootstrap. After updating to Android Studio 1.0 its previews started giving NullPointerException because of setBootstrapType. I couldn't make any debugging without being able to see code so imported as module but now everything works fine.

Is there a way for me to test maven plugin so I can try to find why preview has been broken? If I can't preview it then it is like blind shooting views...

BootstrapButton extends Button

BootstrapButton extends button. One thing I forgot to add is the default sized buttons like "small", "large", etc. I will add it if you decide you want this change.

Pushed my experimental branch

Check out the change notes in the readme on my fork. I uploaded a couple screenshots as well. I made a bunch of changes and rewrote some of the base code, so merging would be difficult. Let me know what you think. I was just testing stuff out and ended up changing a bunch of stuff. Here is the fork: https://github.com/theDazzler/Android-Bootstrap

Error inflating class com.beardedhen.androidbootstrap.BootstrapButton

It seems like BootstrapButton try to get textSize after TypeAdapter recycled cause error "Cannot make calls to a recycled instance!".

Related code snippets in BootstrapButton:

finally {
  a.recycle();
}

// blablabla

if (a.getString(R.styleable.BootstrapButton_android_textSize) == null) {
  fontSize = bootstrapSize.getFontSize();
}

BootstrapButton created by code not visible

I create button by following code

BootstrapButton button = new BootstrapButton(getApplicationContext());
button.setText("Test");
button.setBootstrapType("default");
button.setLeftIcon("fa-heart");

container.addView(button);

but not visible.

icon or text is still invisible after calling setText or setLeftIcon.

Change from library project to simple jar or zip file

I'm writing an app on the latest version of android and when I import this project and add it as a library to my existing project, there are dependency clashes due to both apps using different versions of android-support-v4.jar

How can use in gradle?

Hi!
Could I use Android-Bootstrap in gradle build system? like the following?
compile 'com.beardedhen.androidbootstrap:AndroidBootstrap:+'

Package name

From the src it's com.beardedhen.bbutton
But in the example it called package com.beardedhen.androidbootstrap

BootstrapEditText hint does not work on android 2.3

I got the hint in BootstrapEditText and it just does not appear in android 2.3

<com.beardedhen.androidbootstrap.BootstrapEditText
android:id="@+id/txtEmail"
android:layout_width="280dp"
android:layout_height="30dp"
android:layout_margin="10dp"
android:gravity="center_horizontal"
android:hint="Email"
android:inputType="textEmailAddress"
bootstrapbutton:be_roundedCorners="true" />

BootstrapButton in Relativelayout Error

Using BootstrapButton in Relativelayout with :
android:layout_width="fill_parent"; android:layout_height="wrap_content"
----------------------------------the button take all the space of screen,, it has the same effect of android:layout_width="fill_parent"; android:layout_height="fill_parent"

-----------------------------------but if you use it in LinearLayout, It works fine.

BootstrapCircleThumbnail setImage

i change setImage() on BootstrapCircleThumbnail.java to use universal image loader

public void setImage(int drawable)
    {
        Bitmap bitmap = BitmapFactory.decodeResource(getContext().getResources(), drawable);

        setImage(bitmap);
    }

    public void setImage(Bitmap bitmap){
        float scale = getResources().getDisplayMetrics().density;

        //convert image size to pixels
        int widthPX = (int)((this.imageWidth * scale) + 0.5);
        int heightPX = (int)((this.imageHeight * scale) + 0.5);

        int paddingPX = (int)((this.padding * scale) + 0.5);

        if(this.minimal == false)
        {
            widthPX = widthPX - (paddingPX * 2);
            heightPX = heightPX - (paddingPX * 2);
        }

        Bitmap roundBitmap = ImageUtils.getCircleBitmap(bitmap, widthPX, heightPX);
        image.setImageBitmap(roundBitmap);

        invalidate();
        requestLayout();
    }

Error in parsing the layout_width in BootstrapButton

Like this:

<com.beardedhen.androidbootstrap.BootstrapButton
    android:layout_width="120dp"
    android:layout_height="wrap_content"
    android:text="Default"
    bootstrapbutton:bb_icon_left="fa-heart"
    bootstrapbutton:bb_type="default"/>

There will throw an NumberFormatException in parsing the attribute layout_width in the BootstrapButton.

BootstrapCircleThumbnail with ImageView exposed

thanks for a great library!

I'd like to load an image into a BootstrapCircleThumbnail using the Picasso library, but I can't get access to the thumbnail's ImageView which I'd need to pass to Picasso like so:
Picasso.with(inflater.getContext()).load(group.profile_picture_url).into(imgView);

Any way the library could expose the ImageView?

keep up the great work

Bootstrap buttons not streching to fill the requred space

Hi..im using your library in my project.. i want to show 2 buttons side by side and want them to take up the whole width of the screen,ive included your library as you said but the buttons do not stretch to fill the screen. If i try the code with normal android buttons they stretch to fill the space.can u figure out how i can overcome this.
ive tried using android:layout_weight="1" but the buttons just shift to the left and do not strech
1

this is the code of the button part

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="10"
    android:gravity="center_horizontal|top"
    android:orientation="horizontal" >

    <com.beardedhen.androidbootstrap.BootstrapButton
        android:id="@+id/b_yes"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:gravity="center"
        android:text="YES"
        bootstrapbutton:bb_icon_right="fa-check"
        bootstrapbutton:bb_roundedCorners="true"
        bootstrapbutton:bb_type="success" />

    <com.beardedhen.androidbootstrap.BootstrapButton
        android:id="@+id/b_no"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:gravity="center"
        android:text="NO"
        bootstrapbutton:bb_icon_right="fa-times"
        bootstrapbutton:bb_roundedCorners="true"
        bootstrapbutton:bb_type="primary" />
</LinearLayout>

java.lang.NoSuchFieldError

trying to add a bootstrap button and i get this errors
Rendering Problems The following classes could not be instantiated:
- com.beardedhen.androidbootstrap.BootstrapButton (Open Class, Show Exception)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details java.lang.NoSuchFieldError: layout   at com.beardedhen.androidbootstrap.BootstrapButton.initialise(BootstrapButton.java:186)   at com.beardedhen.androidbootstrap.BootstrapButton.(BootstrapButton.java:108)   at java.lang.reflect.Constructor.newInstance(Constructor.java:408)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at android.view.LayoutInflater.inflate(LayoutInflater.java:504)   at android.view.LayoutInflater.inflate(LayoutInflater.java:385) Copy stack to clipboard

Gradle update, Maven

Could you update to a more recent build of gradle?
Could you check it in into Maven?

AndroidStudio dependencies

Sorry, I'm a Newbie of Android.
I just add
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.beardedhen:androidbootstrap:1.0.4'
}
but it show
Error:Failed to find: com.beardedhen:androidbootstrap:1.0.4
How can I solve it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.