NativeScript Angular ListPicker 的行为类似于 `<select>`

标签 nativescript angular2-nativescript nativescript-angular nativescript-telerik-ui nativescript-plugin

默认情况下 ListPicker占用大量屏幕空间。有没有办法让它表现得像 HTML 的隐喻<select>什么时候显示在手机上?

我用过 this react native plugin之前,这正是我想要的比喻,但对于 NativeScript。

这通过 NativeScript 容易做到吗?我想利用平台特定的选择隐喻,所以显示/隐藏 ListPicker或放ListPicker在模态中不是我要找的。

另外,我将有一个相当长的列表,所以 action Dialog不会为我工作。

更新 : 我知道 nativescript-drop-down ,但是它不使用 webviews 和 react native plugin 特定于平台的“从选择列表中选择”小部件。做。

通过“特定于平台的选择列表小部件”我的意思是这个(来自 https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select ):

iOS (注意选择器呈现键盘所在的位置,使用 rolodex 选择器):



安卓 (注意模态,带有滚动选项列表):

最佳答案

我认为您正在寻找 nativescript-drop-down这类似于您指出的 react-native-picker-select 。

关于NativeScript Angular ListPicker 的行为类似于 `<select>`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54079268/

相关文章:

android - native 脚本 Angular2 : Get Listview label Index or Text on Tap

angular - 如何将现有的 NativeScript Angular 项目转换为代码共享项目

NativeScript FontAwesome 5 免费版在 iOS 中用实体字体覆盖常规字体

javascript - 在nativescript-vue中获取ListView中的复选框索引

android - 使用 Nativescript 的 BottomNavigationBar 不起作用

android - Nativescript Angular 2 禁用后台点击事件

ios - Nativescript Angular Detect Swipe to Back for IOS

javascript - 在 NativeScript 应用程序中与 TextField 交互时停止键盘覆盖

nativescript - 在没有 Angular 的 NativeScript 中是否有类似的 "ngIf"指令?

angular - 带有标签/路由器 socket 的子路由不起作用。 "Error: Cannot match any routes. URL Segment"