title: Unable to set bold style to TextView in Android Studio, either through xml or programatically
body: <p>AndroidManifest.xml</p>
  
  <pre><code>android:theme="@style/AppTheme"
  </code></pre>
  
  <p>styles.xml</p>
  
  <pre><code> &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="android:fontFamily"&gt;@font/montserrat&lt;/item&gt;
      &lt;item name="fontFamily"&gt;@font/montserrat&lt;/item&gt;
      &lt;item name="android:windowTranslucentStatus"&gt;true&lt;/item&gt;
      &lt;item name="android:windowTranslucentNavigation"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>activity_dashboard.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.drawerlayout.widget.DrawerLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      tools:openDrawer="start"&gt;
  
      &lt;include layout="@layout/content_dashboard" /&gt;
  
      &lt;com.google.android.material.navigation.NavigationView
          android:id="@+id/nav_view"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:background="@drawable/background_top_right_radius_white"
          android:fitsSystemWindows="false"
          app:headerLayout="@layout/nav_header"&gt;
  
          &lt;ExpandableListView
              android:id="@+id/expandableListView"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="@dimen/_160sdp"
              android:divider="@color/white"
              android:dividerHeight="0dp"
              android:groupIndicator="@null" /&gt;
  
      &lt;/com.google.android.material.navigation.NavigationView&gt;
  
  &lt;/androidx.drawerlayout.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>content_dashboard.xml (Only sharing the textview code)</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/tvDashboard"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginStart="@dimen/_45sdp"
      android:layout_marginTop="@dimen/_10sdp"
      android:text="@string/dashboard"
      android:textColor="@color/black"
      android:textSize="@dimen/_20sdp"
      android:textStyle="bold" /&gt; //this is not working
  </code></pre>
  
  <p>Dashboard.java</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_dashboard);
  
      TextView tvDashboard = findViewById(R.id.tvDashboard);
      tvDashboard.setTypeface(null, Typeface.BOLD); //this is not working
  }
  </code></pre>
  
  <p>The entire app font has been set to Montserrat using <a href="https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts#via-android-studio" rel="nofollow noreferrer">https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts#via-android-studio</a>. However, in some parts I have headings and such so I would like to change the style to bold. It is working in some places when I'm using the setTypeface code, but it isn't working in other places (including the above example). That is odd and I'm not sure why it is behaving this way.</p>