设置android:menuCategory属性有什么影响?

时间:2012-11-16 20:06:29

标签: android xml menu

在Android菜单资源中,android:menuCategory属性是否存在有什么区别?

我阅读了文档并创建了一些小测试代码,但我无法理解这个属性和常量的含义。

2 个答案:

答案 0 :(得分:0)

通过使用android:menuCategory标签,您可以指定菜单项组的类别并定义项目的优先级。

答案 1 :(得分:0)

我不知道 version: "3" services: namenode: image: bde2020/hadoop-namenode:2.0.0-hadoop3.2.1-java8 container_name: namenode restart: always ports: - 9870:9870 - 9000:9000 volumes: - hadoop_namenode:/hadoop/dfs/name environment: - CLUSTER_NAME=test env_file: - ./hadoop.env datanode1: image: bde2020/hadoop-datanode:2.0.0-hadoop3.2.1-java8 container_name: datanode1 restart: always volumes: - hadoop_datanode1:/hadoop/dfs/data environment: SERVICE_PRECONDITION: "namenode:9870" env_file: - ./hadoop.env datanode2: image: bde2020/hadoop-datanode:2.0.0-hadoop3.2.1-java8 container_name: datanode2 restart: always volumes: - hadoop_datanode2:/hadoop/dfs/data environment: SERVICE_PRECONDITION: "namenode:9870" env_file: - ./hadoop.env datanode3: image: bde2020/hadoop-datanode:2.0.0-hadoop3.2.1-java8 container_name: datanode3 restart: always volumes: - hadoop_datanode3:/hadoop/dfs/data environment: SERVICE_PRECONDITION: "namenode:9870" env_file: - ./hadoop.env resourcemanager: image: bde2020/hadoop-resourcemanager:2.0.0-hadoop3.2.1-java8 container_name: resourcemanager restart: always environment: SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode1:9864 datanode2:9864" env_file: - ./hadoop.env nodemanager1: image: bde2020/hadoop-nodemanager:2.0.0-hadoop3.2.1-java8 container_name: nodemanager restart: always environment: SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode1:9864 datanode2:9864 resourcemanager:8088" env_file: - ./hadoop.env historyserver: image: bde2020/hadoop-historyserver:2.0.0-hadoop3.2.1-java8 container_name: historyserver restart: always environment: SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode1:9864 datanode2:9864 resourcemanager:8088" volumes: - hadoop_historyserver:/hadoop/yarn/timeline env_file: - ./hadoop.env volumes: hadoop_namenode: hadoop_datanode1: hadoop_datanode2: hadoop_datanode3: hadoop_historyserver: 的确切用例,但我在有 HomeFragment 的项目中使用了它,我可以从它转到 LoginFragment。在 LoginFragment 中,我有一个菜单(在右上角)用于转到 SettingsFragment。

当我进入设置并返回时,它返回主页而不是登录页面。但我希望它返回之前的位置(登录页面)。因此我使用了 menuCategory,并且它起作用了

menuCategory