Skip to content

Commit

Permalink
Use Roboto Regular instead of Thin when no typeface is specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbergeron committed Mar 19, 2014
1 parent 693fd2d commit d21aa94
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ private void onInitTypeface(Context context, AttributeSet attrs) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ private void onInitTypeface(Context context, AttributeSet attrs, int defStyle) {
return;
}

int typefaceValue = 0;
int typefaceValue = RobotoTypefaceManager.ROBOTO_REGULAR;
if (attrs != null) {
TypedArray values = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView, defStyle, 0);
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, 0);
values.recycle();
if (values != null) {
typefaceValue = values.getInt(R.styleable.RobotoTextView_typeface, typefaceValue);
values.recycle();
}
}

Typeface robotoTypeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
Expand Down

0 comments on commit d21aa94

Please sign in to comment.