如何在驾驶时实现一个用于 Android Auto 的模板,使得可以按字母进行搜索?

huangapple go评论77阅读模式
英文:

How do I implement a template for Android Auto that enables search by letter while driving?

问题

I want to make an app for Android Auto and the user should be able to search through a long list of items by name during the drive. Obviously, the keyboard is blocked while driving and I am aware of that, but I've seen a functionality in the native phone app and also in Spotify that offers the user to select the first letter of what he wants to see to seize down the results. (That would already greatly reduce results, as it would split them by 28. I know that there is no possibility to search with more than one letter and I also don't need that, one is just enough, would already be great).
Here are screenshots of what it looks like in Spotify:

我想制作一个用于Android Auto的应用程序,用户应该能够在驾驶过程中通过名称搜索长列表中的项目。显然,驾驶时键盘被屏蔽,我知道这一点,但我在原生电话应用程序和Spotify中看到了一个功能,允许用户选择他想要查看的第一个字母以限制结果。这将大大减少结果,因为它会按字母A-Z进行分割。我知道不能使用多个字母进行搜索,而且我也不需要,只需一个字母就足够了,这已经很好了。
以下是Spotify中的屏幕截图:如何在驾驶时实现一个用于 Android Auto 的模板,使得可以按字母进行搜索? 如何在驾驶时实现一个用于 Android Auto 的模板,使得可以按字母进行搜索?

I tried it with SearchTemplate and Gridtemplate of the Android for Cars App Library (as Spotifys thing looks like a Gridtemplate) on CarApiLvl 5 and added a huge list (100 items) that made the template display a scrollbar. I also added a major case letter of the alphabet to every item in front, hoping that the system may look for something like that. However, the functionality did not show up automatically, so I suppose it's either not built in or it requires some specific meta-data/callback to work. Sadly, I cannot find any official documentation on it. Does any of you know, how to get use of this functionality? Is there a sort functionality I need to implement and expose or anything like that? I am working with the Android for Cars App Library, so I can't really do any custom stuff.

我尝试使用Android for Cars App Library的SearchTemplate和Gridtemplate(因为Spotify的界面看起来像Gridtemplate)在CarApiLvl 5上进行操作,并添加了一个庞大的列表(100个项目),使模板显示滚动条。我还在每个项目的前面添加了一个大写字母,希望系统可能会搜索这样的内容。然而,该功能没有自动显示出来,所以我认为要么没有内置此功能,要么需要某些特定的元数据/回调来使其工作。遗憾的是,我找不到任何官方文档。你们中是否有人知道如何使用这个功能?是否需要实现和公开某种排序功能或类似的功能?我正在使用Android for Cars App Library工作,所以不能进行自定义操作。

英文:

I want to make an app for Android Auto and the user should be able to search through a long list of items by name during the drive. Obviously, the keyboard is blocked while driving and I am aware of that, but I've seen a functionality in the native phone app and also in Spotify that offers the user to select the first letter of what he wants to see to seize down the results. (That would already greatly reduce results, as it would split them by 28. I know that there is no possibility to search with more than one letter and I also don't need that, one is just enough, would already be great).
Here are screenshots of what it looks like in Spotify:
如何在驾驶时实现一个用于 Android Auto 的模板,使得可以按字母进行搜索?
如何在驾驶时实现一个用于 Android Auto 的模板,使得可以按字母进行搜索?

I tried it with SearchTemplate and Gridtemplate of the Android for Cars App Library (as Spotifys thing looks like a Gridtemplate) on CarApiLvl 5 and added a huge list (100 items) that made the template display a scrollbar. I also added a major case letter of the alphabet to every item in front, hoping that the system may look for something like that. However, the functionality did not show up automatically, so I suppose it's either not built in or it requires some specific meta-data/callback to work.
Sadly, I cannot find any official documentation on it.
Does any of you know, how to get use of this functionality?
Is there a sort functionality I need to implement and expose or anything like that?
I am working with the Android for Cars App Library, so I can't really do any custom stuff.

答案1

得分: 0

目前,对于汽车应用库(Car App Library)应用,没有与之等效的功能。虽然像Spotify这样的媒体应用可能看起来与使用Car App Library构建的应用相似,但它们实际上并非是使用Car App Library构建的。如果您愿意,您可以提出关于Car App Library的功能请求,并提供有关您的用例的详细信息。 功能请求链接

英文:

There isn't an equivalent to this for Car App Library apps at this point. Though media apps like Spotify may look similar to apps built using the Car App Library, they aren't actually built with it. If you'd like, you can make a feature request for the Car App Library and provide details about your use case.

huangapple
  • 本文由 发表于 2023年5月25日 16:50:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76330452.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定