问题
Do you know how to have a two lines menu item title? I've tried using \n in the string or Html.fromHtml with
tag but it doesn't work. Thanks
回答1:
This is the recommended answer from Google: "If text in a simple menu wraps to a second line, use a simple dialog instead. Simple dialogs can have rows with varying heights."
https://material.io/guidelines/components/menus.html#menus-simple-menus
回答2:
You can use String line=System.getProperty("line.separator")
this will give you newline effect in string.
来源:https://stackoverflow.com/questions/4713598/two-line-text-for-menuitem