Skip to content

Commit 62ff65e

Browse files
tidy up
1 parent 76f3e58 commit 62ff65e

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

AndroidBootstrap/src/com/beardedhen/androidbootstrap/BootstrapButton.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,14 @@ private void initialise(AttributeSet attrs) {
190190

191191
setBootstrapType(bootstrapStringType);
192192
//set the font awesome icon typeface
193-
lblLeft.setTypeface(FontAwesome.getFont(getContext()));
194-
lblRight.setTypeface(FontAwesome.getFont(getContext()));
193+
194+
195+
196+
if (!isInEditMode()) {
197+
198+
lblLeft.setTypeface(FontAwesome.getFont(getContext()));
199+
lblRight.setTypeface(FontAwesome.getFont(getContext()));
200+
}
195201

196202
//set up the font size
197203
lblLeft.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSize);

AndroidBootstrap/src/com/beardedhen/androidbootstrap/BootstrapThumbnail.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ private enum ThumbnailTypes {
3434
public static ThumbnailTypes getTypeFromBoolean(boolean roundedCorners) {
3535
return (roundedCorners) ? ROUNDED : SQUARE;
3636
}
37+
38+
public int getContainerDrawable() {
39+
return containerDrawable;
40+
}
41+
42+
public int getPlaceholderDrawable() {
43+
return placeholderDrawable;
44+
}
3745
}
3846

3947
public BootstrapThumbnail(Context context) {
@@ -109,12 +117,12 @@ private void initialise(AttributeSet attrs) {
109117
type = ThumbnailTypes.getTypeFromBoolean(roundedCorners);
110118

111119
//apply the background type
112-
container.setBackgroundResource(type.containerDrawable);
120+
container.setBackgroundResource(type.getContainerDrawable());
113121

114122
//if no image is provided by user
115123
if (imageDrawable == 0) {
116124
//set default grey placeholder background
117-
placeholder.setBackgroundResource(type.placeholderDrawable);
125+
placeholder.setBackgroundResource(type.getPlaceholderDrawable());
118126

119127
//set the text
120128
if (text.length() > 0) {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
VERSION_NAME=1.1.0
2-
VERSION_CODE=110
1+
VERSION_NAME=1.1.1
2+
VERSION_CODE=111
33
GROUP=com.beardedhen
44

55
POM_DESCRIPTION=Bootstrap style buttons with Font Awesome

0 commit comments

Comments
 (0)