英文:
Android App long Shortcut label Character start ellipsis after 15 or 16 characters?
问题
根据Google文档中与应用快捷方式相关的内容:
在显示应用快捷方式的菜单中,空间有限。如果可能的话,请将快捷方式的“短描述”长度限制为10个字符,并将“长描述”的长度限制为25个字符。
所以,如果我在Google Pixel 5a设备上将长标签文本设置为Wi-Fi信号强度,应用快捷方式标签在15个字符后开始出现省略号,这是预期的行为吗?如果是,那么为什么文档中说要将“长描述”限制为25个字符?
或者
是否有办法显示完整的长标签,即Wi-Fi信号强度,而不出现省略号?
例如:
ShortcutInfo shortcut = new ShortcutInfo.Builder(this, value)
.setShortLabel(shortLabel)
// 长标签的限制为20个字符,少于25个字符,但在15个字符后也开始出现省略号。
.setLongLabel(longLabel)
.setIcon(shortIcon)
.setIntent(intentShortcut)
.build();
英文:
As per the Google documentation related to App shortcut:
> Space is limited within the menu that shows your app's shortcuts in the launcher. When possible, limit the length of the "short description" of a shortcut to 10 characters, and limit the length of the "long description" to 25 characters.
So If I set long Label text as Wi-Fi Signal Strength in Google Pixel 5a device, App shortcut label start ellipses after 15 characters, Is that expected behavior? If so, then why does documentation says limit of "long description" to 25 characters.???
Or
Is there any way to display complete long label ie. Wi-Fi Signal Strength without any ellipses??
for eg:-
ShortcutInfo shortcut = new ShortcutInfo.Builder(this, value)
.setShortLabel(shortLabel)
//limit of longLabel is 20 characters which is lesser than 25 then also it start ellipses after 15 characters.
.setLongLabel(longLabel)
.setIcon(shortIcon)
.setIntent(intentShortcut)
.build();
答案1
得分: 1
这是期望的行为吗?
这将取决于主屏幕实现和用户设置(例如,字体比例)等可能的其他标准。
如果是的话,为什么文档说“长描述”的限制是 25 个字符?
这只是一个指南。
英文:
> Is that expected behavior?
It will vary by home screen implementation and user settings (e.g., font scale), among possibly other criteria.
> If so, then why does documentation says limit of "long description" to 25 characters.???
It is merely a guideline.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论