Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently May 22nd, 2024, 12:04 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: List- or Dropdown Box in an Android App
PostPosted: September 14th, 2016, 2:37 pm 
Offline

Joined: August 22nd, 2005, 11:56 am
Posts: 125
Location: The Netherlands
Opus: Pro 9.75 (Build 16749)
OS: Windows 10 Pro 64-bit
Is there a solution to create a list- or dropdown box in an Android App?
To create it in a HTML5 website is no problem, except for the fact that on (most) Android tablets the website will show a drop down box in favour of a list box.

I've tried the following...

Using Opus Script:
Android HTML5 Preview: Works
Android App: Doesn't Work

Using Javascript Action (in Opus):
Android HTML5 Preview: Doesn't work, although all items are listed in the .htm page; No errors!
Android App: Doesn't Work

Now, I've read something about Android Spinner, which should be the way to create the mentioned boxes in an Android App, but I can't find any way on how to incorporate it in my Opus Publication... As the 'general' List Box in Opus also can not be used I wondered if any one has a solution to this.

Jan

_________________
"World War II Allied Aircraft Crashes in the Netherlands & North Sea" (Made with Opus Pro 9.75), available via https://www.airwar4045.nl


For this message Jan has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: List- or Dropdown Box in an Android App
PostPosted: September 16th, 2016, 8:55 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
OpusScript when published to HTML is JavaScript so both should work.

And an Android App is just a wrapped HTML5 project so again should work. The issue with Android Apps is that they use the WebView browser component. This was a system component that could only be upgraded when the OS was updated and therefore likely remains out-of-date and lacking features in older android versions. Current Android OSs have WebView as a play store application and therefore kept up-to-date like any other browser on your device.

So the problem...

Yes, Android will display a listbox, even with a fixed size value, as a drop down. As far as I'm aware this cannot be changed and you would need to be build a custom version if you needed a listbox type control. However, adding the select element to an Opus project does work correctly in an Android App running on Lollipop and Marshmallow and clicking the drop-down displays the spinner automatically.

Here's the simple code I added to the Opus HTML Object:

Code:
<select size="3" name="decision2">
<option selected>Plan 1
<option>Plan 2
<option>Plan 3
<option>Plan 4
<option>Plan 5
</select>


And here what it looks like when I select the drop-down in Android Marshmallow:

http://sandbox.interaktiv.co.uk/apk/select.jpg

And here is the APK if you want to sideload that:

http://sandbox.interaktiv.co.uk/apk/select.apk

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: List- or Dropdown Box in an Android App
PostPosted: September 16th, 2016, 7:10 pm 
Offline

Joined: August 22nd, 2005, 11:56 am
Posts: 125
Location: The Netherlands
Opus: Pro 9.75 (Build 16749)
OS: Windows 10 Pro 64-bit
Hello Mack,

Thanks for the reply... It now works!
Not because of your answer (though I really appreciate your efforts to help me out), but because...silly, silly me... I had forgotten to select the "Requires Internet Access" option (data for the listbox comes from a database) :roll:

Jan

_________________
"World War II Allied Aircraft Crashes in the Netherlands & North Sea" (Made with Opus Pro 9.75), available via https://www.airwar4045.nl


For this message Jan has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group