PhoneGap的&安培; Android的 - 如何使用新的选择列表样式 [英] PhoneGap & Android - How to use the new select list style

查看:120
本文介绍了PhoneGap的&安培; Android的 - 如何使用新的选择列表样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的PhoneGap开发的移动应用程序为Android。我还出版了它的浏览器。

I developed an mobile app for Android using PhoneGap. I also published it for browsers.

在我的电话,当我在Chrome浏览应用程序,我得到以下选择菜单风格:

On my phone, when I view the app in Chrome, I get the following select menu style :

然而,当我打开与PhoneGap的打包应用程序,我得到这样的:

However, when I open the app packaged with PhoneGap, I get this :

有关完全相同的code。

For the exact same code.

我怎样才能在样式Android设备上的选择菜单,以便它看起来像在Chrome?

How can I style the select menu on the Android device so it appears like in Chrome?

我试图用--webkit出场,但我不知道如何使用它究竟是...

I tried using --webkit-appearance, but I'm not sure how to use it exactly...

推荐答案

每个移动平台具有被设计成保持最好的用户的注意兴趣其自己的设计原则。对于iOS它甚至可能意味着你的应用程序将会被拒绝。

You can't but more important you should not!

Each mobile platform has its own design principles which are designed to keep best user's interest in mind. For iOS it could even mean that your app will be rejected.

甚至不同的Andr​​oid构建往往有不同的UI原则,就像在你的照片,其中第一个显示了从原生Android的选择菜单,最后显示了三星的Andr​​oid选择菜单。

Even different android builds tend to have different ui principles like in your pictures where the first one shows the select menu from original android and the last shows the select menu from samsungs android.

所以你不能使用CSS样式的选择菜单。然而,你可以编写一个插件的PhoneGap给你一个自定义选择菜单。

So you can't style the select menu using css. However you could write a phonegap plugin to give you a custom select menu.

另一种选择是建立无需HTML的选择,但只是JavaScript中的选择菜单。但我不会建议。

Another option would be to build a select menu without html's select but just javascript. But I would not suggest that.

这篇关于PhoneGap的&安培; Android的 - 如何使用新的选择列表样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆