Android toolbar menu is not showing

I was also facing the same problem, but the actual error was, i forgot to introduce toolbar in java activity under AppCompactActivity, under on create method define your toolbar by id and call setSupportActionBar(ToolBar); Example is below: public class secondActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_second); Toolbar toolbar = (Toolbar) … Read more

How to enable homeAsUp or call setDisplayHomeAsUpEnabled() on standalone toolbar with appcompat v21

@Pedro Oliveira’s solution worked. I could even find the drawable that the AppCompat library uses (and therefore is already included in the apk). What more it’s also mirrored, so it works both for ltr, rtl locales: actionbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha); and this is it alltogether, with the correction from @VictorYakunin public class SettingsActivity extends PreferenceActivity { @Override protected … Read more

Change ActionBar title text color using Light.DarkActionBar theme in AppCompat 21

You can change it with actionBarStyle attribute of theme. <style name=”AppBaseTheme” parent=”@style/Theme.AppCompat.Light.DarkActionBar”> <item name=”actionBarStyle”>@style/MyActionBar</item> </style> <style name=”MyActionBar” parent=”@style/Widget.AppCompat.ActionBar.Solid”> <item name=”titleTextStyle”>@style/MyTitleTextStyle</item> </style> <style name=”MyTitleTextStyle” parent=”@style/TextAppearance.AppCompat.Widget.ActionBar.Title”> <item name=”android:textColor”>CHANGE_COLOR_HERE</item> </style>

Android v7 Toolbar button alignment

You should add android:layout_gravity=”end” for your Button : <Button android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”end” android:id=”@+id/showevents” android:textSize=”12sp” android:background=”@null” android:layout_alignParentEnd=”true” android:layout_alignParentRight=”true” android:textColor=”#FFF” android:text=”UPCOMING \nEVENTS”/>