Merge "Refine resolution order for typeface and fontFamily" into lmp-mr1-dev
This commit is contained in:
@@ -658,6 +658,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
ColorStateList textColorLink = null;
|
ColorStateList textColorLink = null;
|
||||||
int textSize = 15;
|
int textSize = 15;
|
||||||
String fontFamily = null;
|
String fontFamily = null;
|
||||||
|
boolean fontFamilyExplicit = false;
|
||||||
int typefaceIndex = -1;
|
int typefaceIndex = -1;
|
||||||
int styleIndex = -1;
|
int styleIndex = -1;
|
||||||
boolean allCaps = false;
|
boolean allCaps = false;
|
||||||
@@ -1012,6 +1013,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
|
|
||||||
case com.android.internal.R.styleable.TextView_fontFamily:
|
case com.android.internal.R.styleable.TextView_fontFamily:
|
||||||
fontFamily = a.getString(attr);
|
fontFamily = a.getString(attr);
|
||||||
|
fontFamilyExplicit = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case com.android.internal.R.styleable.TextView_password:
|
case com.android.internal.R.styleable.TextView_password:
|
||||||
@@ -1300,6 +1302,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
typefaceIndex = MONOSPACE;
|
typefaceIndex = MONOSPACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typefaceIndex != -1 && !fontFamilyExplicit) {
|
||||||
|
fontFamily = null;
|
||||||
|
}
|
||||||
setTypefaceFromAttrs(fontFamily, typefaceIndex, styleIndex);
|
setTypefaceFromAttrs(fontFamily, typefaceIndex, styleIndex);
|
||||||
|
|
||||||
if (shadowcolor != 0) {
|
if (shadowcolor != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user