Git Product home page Git Product logo

Comments (7)

jamie-beardedhen avatar jamie-beardedhen commented on August 15, 2024

Have you tried setting layout_width to 0dp, and ensuring that each BootstrapButton has a weight attribute? Your example has the weight attribute in the ViewGroup, so the buttons look like what I would expect. Let me know if this doesn't solve the issue.

from android-bootstrap.

clinton2111 avatar clinton2111 commented on August 15, 2024

Yes I did come across that solution after Googling for a while but it didn't solve my problem. When I added the weight attribute the button just shifts to the left a bit. But doesn't stretch to fill the required space

from android-bootstrap.

clinton2111 avatar clinton2111 commented on August 15, 2024

1
This is how it looks when i add layout_width to 0dp and add a weight.. the actually area is shown to stretch but the button doesn't show any expansion

from android-bootstrap.

jamie-beardedhen avatar jamie-beardedhen commented on August 15, 2024

I've made a fix on my local branch that looks like the screenshot below - I assume that this can be marked as resolved as soon as the changes are pushed.

device-2014-11-25-105018

from android-bootstrap.

clinton2111 avatar clinton2111 commented on August 15, 2024

could you please send me the code for the stretched buttons cause it still doesn't seem to work. The button outline now stretches but still has the height problem
1

    <com.beardedhen.androidbootstrap.BootstrapButton
        android:id="@+id/OK"
        style="@style/AppBaseTheme"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:layout_weight="1"
        android:text="OK"
        bootstrapbutton:bb_icon_left="fa-envelope"
        bootstrapbutton:bb_roundedCorners="true"
        bootstrapbutton:bb_size="medium"
        bootstrapbutton:bb_type="default" />

    <com.beardedhen.androidbootstrap.BootstrapButton
        android:id="@+id/cancel"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:layout_weight="1"
        android:text="CANCEL"
        bootstrapbutton:bb_icon_left="fa-times"
        bootstrapbutton:bb_roundedCorners="true"
        bootstrapbutton:bb_size="medium"
        bootstrapbutton:bb_type="default" />
</LinearLayout>

from android-bootstrap.

jamie-beardedhen avatar jamie-beardedhen commented on August 15, 2024

It looks like the BootstrapButton was switching between the layouts it inflated. As I can't see any reason for this, I've simplified the View so that it only uses one layout. I've tested it in the screenshot below (weighted buttons for the first row, and all possible height/width combinations in the second). A release should be available shortly, so I'll close this issue - let me know if it's still a problem.

Also, if anyone else has run into this problem with different Bootstrap views, please let me know.

device-2014-11-28-101425

from android-bootstrap.

clinton2111 avatar clinton2111 commented on August 15, 2024

Thank you so much..works perfectly now

from android-bootstrap.

Related Issues (20)

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.