I have several days now that I am trying to make this work properly.I am trying to set a custom layout for my application's toolbar
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="#fff"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:id="@+id/toolbar">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-smallcaps"
android:text="@string/app_name"
android:textColor="@color/green"
android:textSize="16sp"
android:textStyle="bold"
/>
</android.support.v7.widget.Toolbar>`
Manifest.XMl
android:theme="@style/MyMaterialTheme">
and my styles.xml:
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
</style>
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
In my mainLayout it seems when I am editing it works ok,when I run the application doesn't can sb help me?