Comments (7)
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.
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.
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.
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.
from android-bootstrap.
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
<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.
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.
from android-bootstrap.
Thank you so much..works perfectly now
from android-bootstrap.
Related Issues (20)
- How can I use Databinding for bootstrapText? HOT 1
- How can set data to BootstrapDropDown programmatically? HOT 1
- Font 'fontawesome-webfont-v470.ttf' not properly registered. HOT 2
- how to use custom color? HOT 1
- Update gradle dependencies HOT 1
- Making bootstrap button extend android.widget.button HOT 1
- app stopped when bootstrap dropdown inserted HOT 1
- Using Custom Fonts
- Bootstrap Dropdown doesn't work programmatically
- BootstrapProgressBar crashed when setting maxProgress
- BootstrapProgressBar
- landscape issue in bootstrap progress bar HOT 1
- Cannot show or hide Bootstrap button (visibility change) HOT 4
- radio button problem in a scroll view
- Rounded corners of ProgressBarGroup breaks if maximum
- .
- Cannot set background color
- .
- Compatibility with androidx HOT 1
- icons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-bootstrap.