Android原生創建菜單

  首先,需要在res目錄下創建一個名爲menu的文件夾(名字隨意),在文件夾中創建一個名爲main.xml的xml文件; 在xml文件裏寫如下代碼,可自定義: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item andr
相關文章
相關標籤/搜索