roberthovhannisyan / phonegap-plugin-listpicker Goto Github PK
View Code? Open in Web Editor NEWListPicker Plugin for Cordova/PhoneGap (iOS and Android)
License: MIT License
ListPicker Plugin for Cordova/PhoneGap (iOS and Android)
License: MIT License
Can someone tell
How do i call manually call cancel button function to close the list picker element..?
On the iPad, is it Possible to make the dialog window wider to display more of the text?
In IOS Dark Mode, the dropdown items are not visible. We can see poor visible text. In Light Mode its working fine. Any fix regarding this issue ?
It would be a great enhancement to support having multiple rows in the picker. A dev could provide an object in the config with arrays for each column.
Hi,
This warning is appearing then the listpicker doesn't show. Instead it shows a 'done' that once hit shows the listpicker.
Any ideas?
according to this
http://phonegap.com/blog/2015/05/26/npm-plugins-available/
http://cordova.apache.org/announcements/2015/04/21/plugins-release-and-move-to-npm.html
so...your plugin should be move to npm in the future...
It would be really nice if you could add the ability to change the color of the cancel and done buttons for iOS.
Thanks for your awesome work!
I have an array which is created at run time. I want to use this array as the list.
venue_array=(["NGS","NGS"],["VMl","VM"],["KGS","KGS"],["BVB","BVB"]);
var config = { title: "Select a Venue", items: venue_array, selectedValue: "NGS", doneButtonLabel: "Done", cancelButtonLabel: "Cancel" };
Hey,
first of all: really nice work - thanks a lot. :)
Nevertheless I have a single suggestion:
I think, that the usability of the ListPicker on Android is a little inconsistent. Normally (as you know it from the web) Radio-Buttons are used with an submit button, like the doneButton you are actually suggesting. On Android instead klicking a list-item is not only checking it, but also choosing it.
Therefore in my opinion there are two, slightly more consistent alternatives:
I would prefer Option 2) - But then you have to think about how to highlight the default-option ;)
Hi,
An error occured when I build my app under ios with cordova version ios 4.0.1.
The solution is to remove the import file #import <Cordova/CDVDebug.h >
into the ListPicker.m.
Could you solve this problem for the next version ?
Thanks.
CompileC build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/Objects-normal/i386/CDVConnection.o ServiceNav/Plugins/cordova-plugin-network-information/CDVConnection.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/jdflaugergues/.nvm/versions/node/v5.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/apache-ant-1.9.4/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=170 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=c99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/r3/dt1_tm7n2ng4m7hs5_zm7lx90dq85b/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -fvisibility=hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/ServiceNav-generated-files.hmap -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/ServiceNav-own-target-headers.hmap -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/ServiceNav-all-target-headers.hmap -iquote /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/ServiceNav-project-headers.hmap -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/emulator/include -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/emulator/usr/local/lib/include -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/UninstalledProducts/include -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/UninstalledProducts/iphonesimulator/include -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/emulator -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/DerivedSources/i386 -I/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/DerivedSources -F/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/emulator -include /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/sharedpch/ServiceNav-Prefix-aoakqnokwzpyvyelwdypfmxqkzgq/ServiceNav-Prefix.pch -MMD -MT dependencies -MF /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/Objects-normal/i386/CDVConnection.d --serialize-diagnostics /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/Objects-normal/i386/CDVConnection.dia -c /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/ServiceNav/Plugins/cordova-plugin-network-information/CDVConnection.m -o /Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/Objects-normal/i386/CDVConnection.o
** BUILD FAILED **
The following build commands failed:
CompileC build/ServiceNav.build/Debug-iphonesimulator/ServiceNav.build/Objects-normal/i386/ListPicker.o ServiceNav/Plugins/cordova-plugin-listpicker/ListPicker.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR building one of the platforms: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/cordova/build-debug.xcconfig,-project,ServiceNav.xcodeproj,ARCHS=i386,-target,ServiceNav,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/sharedpch
You may not have the required environment or OS to build this project
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/cordova/build-debug.xcconfig,-project,ServiceNav.xcodeproj,ARCHS=i386,-target,ServiceNav,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/jdflaugergues/workspace/git/mobile-application/platforms/ios/build/sharedpch
I am using month and monthindex in list view
items: [
{ text: "January", value: "1" },
{ text: "February", value: "2" }, and so on
alert("You have selected " + item); - displays the value of the selected index.
But how do i get the text of the selected index.
for example when i select jan, i want both the values Jan and 1 to be displayed. pl help
The link shown here is wrong and does not work to install the plugin for use in a cordova project. The working command with the correct link is following:
$ cordova plugin add cordova-plugin-listpicker
when there is an empty array for the list and when i tap on done button it gives an error like "'*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
libc++abi.dylib: terminating with uncaught exception of type NSException"
Hi !
The ListPicker crashes my app on iOS 9.2.1 right at invocation of the window.plugins.listpicker.showPicker
method with the following error:
'NSInvalidArgumentException', reason: '-[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0x15dae700'
*** First throw call stack:
(0x259ee2eb 0x251badff 0x259f3ab5 0x259f170f 0x25920c88 0xa549b 0xa5f53 0xbd433 0xbcd2f 0x2620a567 0x259b1257 0x259b0e47 0x259af1af 0x25901bb9 0x259019ad 0x26b7baf9 0x29bedfb5 0x9d5c3 0x255b4873)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Any idea about what's happening?
Thanks !
I am new to phonegap. I am using build.phonegap.com. I have included the plugin and example script.
Placed config object in js file
var config = {
title: "Select a Fruit",
items: [
{ text: "Orange", value: "orange" },
{ text: "Apple", value: "apple" },
{ text: "Watermelon", value: "watermelon" },
{ text: "Papaya", value: "papaya" },
{ text: "Banana", value: "banana" },
{ text: "Pear", value: "pear" }
],
selectedValue: "papaya",
doneButtonLabel: "Done",
cancelButtonLabel: "Cancel"
};
And placed show picker script inside a div element like
<script> // Show the picker window.plugins.listpicker.showPicker(config, function(item) { alert("You have selected " + item); }, function() { alert("You have cancelled"); } ); </script>But the listpicker is not visible in app page. Can you please help me in how to use with a use case example. Thanks in advance.
In IOS, if the dark theme is enabled, then the list picker text color style doesn't get change accordingly. As the default text, the color scheme is black, so in a dark theme, it doesn't visible.
Is there a way to allow multiple rows selection ?
Is there any plugin which will display ios list picker inline in document/page ?. Not as a modal popup.
Any plans to enable filtering of long lists of items?
Thx
all detail right here
dpa99c/cordova-diagnostic-plugin#27
this is why "cordova-plugin-listpicker" also have this error too
developer should be follow this in [email protected]
http://cordova.apache.org/announcements/2015/12/08/cordova-ios-4.0.0.html
Android is totally work (Android 4.4)
but in ios 8 (ipad mini)
https://raw.githubusercontent.com/roberthovhannisyan/PhoneGap-Plugin-ListPicker/23f46f26017814b183e7ddb1208779b4addb85d3/screenshots/iphone1.png
when I press the "Done" button,"nothing happened"...
not like "Android" will feedback and trigger the "item" callback
When you are using the native select element, when you click outside the modal is close.
I think that this should be the default behavior for this one too!
The plugin automatically returns the text of the selected item, but for the life of me I can't seem to figure out how to get the value of the selected item. I'm looking primarily to get the text for display to the end user, but then the value of the selected index to be passed onto the next command.
How can this be achieved using this plugin? Information populated to the list needs to be dynamic as it's specified from the previous JSON query in the code, and the selection needs to be passed to the following code. How do you get the value of the item selected?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.