我刚回到android,现在享受了在android studio中进行设计的速度和便捷性,直到遇到尝试解决工具栏中的此菜单图标的麻烦为止。
我使用抽屉的默认活动创建了一个活动。
我将所有内容保持原样,直接进入app_bar_main.xml
,在navigationIcon
标签中看到了collapseicon
和Design
。
我很高兴只花了几秒钟,但随后我运行了该应用程序,菜单图标没有更改。
我尝试的内容
1。)以编程方式执行setNavigationIcon-不工作
2。)找到了一些使用toggle
和sync
的解决方案(以及放在首位的位置)-不可行
其他问题
1。)如果将collapseIcon
覆盖在应用栏上,他们为什么要放import json
import requests
url = "https://mashape-community-urban-dictionary.p.rapidapi.com/define"
querystring = {"term":"chicken"}
headers = {
'x-rapidapi-host': "mashape-community-urban-dictionary.p.rapidapi.com",
'x-rapidapi-key': "KEY"
}
response = requests.request("GET", url, headers=headers, params=querystring)
json_data = response.text
json_object = json.loads(json_data)
#json_object = json.dumps(json_object, indent = 4)
print(json_object["list"][0]["definition"]) # you can use the for statement to get all the definitions
。 -我会找到一些解决方案
如果Android 4在更改菜单图标方面发生了任何变化,我将非常感谢。