Here is my main_activity.xml and below you can see the style I am using
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/nav_host_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:itemIconTint="@color/color_white"
app:itemTextColor="@color/color_white"
app:menu="@menu/bottom_nav" />
</LinearLayout>
</layout>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:colorPrimary">#3f51b5</item>
<item name="android:textColorPrimary">#FF0000</item>
<item name="colorPrimary">#3f51b5</item>
</style>
and Programmatically I don't know how to change actionbar title color and actually I could not change text color in xml as well (but the later one I just want to know for curiosity ) I need to change actionbar title color Programmatically