I am setting Typeface of a textview like this
textView.setTypeface(tf_roboto_medium, Typeface.BOLD);
When I check the style using this command, it is evaluated true.
if (textView.getTypeface().getStyle() == Typeface.NORMAL) {
// always here
}
else {
// never here
}
[EDIT] Here is my xml content for the TextView
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="Train"
android:textColor="#777777"
android:gravity="bottom|center"
android:singleLine="true"
android:id="@+id/txt_train"
android:layout_gravity="left"
android:layout_weight="15"
android:textSize="32px"
android:onClick="onTrainClick"
android:clickable="true" />
What am I doing wrong?
PS : I have read other posts asking for the same thing. None of them seems to work for me. Thus the quesiton