File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed
AndroidBootstrap/src/com/beardedhen/androidbootstrap Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -190,8 +190,14 @@ private void initialise(AttributeSet attrs) {
190
190
191
191
setBootstrapType (bootstrapStringType );
192
192
//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
+ }
195
201
196
202
//set up the font size
197
203
lblLeft .setTextSize (TypedValue .COMPLEX_UNIT_SP , fontSize );
Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ private enum ThumbnailTypes {
34
34
public static ThumbnailTypes getTypeFromBoolean (boolean roundedCorners ) {
35
35
return (roundedCorners ) ? ROUNDED : SQUARE ;
36
36
}
37
+
38
+ public int getContainerDrawable () {
39
+ return containerDrawable ;
40
+ }
41
+
42
+ public int getPlaceholderDrawable () {
43
+ return placeholderDrawable ;
44
+ }
37
45
}
38
46
39
47
public BootstrapThumbnail (Context context ) {
@@ -109,12 +117,12 @@ private void initialise(AttributeSet attrs) {
109
117
type = ThumbnailTypes .getTypeFromBoolean (roundedCorners );
110
118
111
119
//apply the background type
112
- container .setBackgroundResource (type .containerDrawable );
120
+ container .setBackgroundResource (type .getContainerDrawable () );
113
121
114
122
//if no image is provided by user
115
123
if (imageDrawable == 0 ) {
116
124
//set default grey placeholder background
117
- placeholder .setBackgroundResource (type .placeholderDrawable );
125
+ placeholder .setBackgroundResource (type .getPlaceholderDrawable () );
118
126
119
127
//set the text
120
128
if (text .length () > 0 ) {
Original file line number Diff line number Diff line change 1
- VERSION_NAME =1.1.0
2
- VERSION_CODE =110
1
+ VERSION_NAME =1.1.1
2
+ VERSION_CODE =111
3
3
GROUP =com.beardedhen
4
4
5
5
POM_DESCRIPTION =Bootstrap style buttons with Font Awesome
You can’t perform that action at this time.
0 commit comments