13
Cách đặt menu thành Thanh công cụ trong Android
Tôi muốn sử dụng ToolBarthay vì ActionBar, nhưng không hiển thị cho tôi menu trên thanh công cụ !!! tôi muốn đặt menu chẳng hạn như các nút Làm mới hoặc Cài đặt trong ActionBar. Mã Toolbar.xml: <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:minHeight="?attr/actionBarSize" app:navigationContentDescription="@string/abc_action_bar_up_description" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" …