You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
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)
The text was updated successfully, but these errors were encountered:
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:
<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:
<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)
The text was updated successfully, but these errors were encountered: