Prev and next buttons for pickers in Sencha Touch 2 - sencha-touch-2

I'm building an App for Android, iOS and Blackberry with Sencha Touch 2.0.1.
I have a Form-Panel with about 10 selectfields and some sextfields. If i ran the app on Android 2.3 or higher, the selectfields are shown as pickers. So far so good.
When the user starts filling out the form starting with textfields, he can go through the form using the next-button on the virtual keyboard. The problem is, that the selectfields are ignored by the next-button. The user has to tap on the selectfields.
I can't figure out how to get prev- and next-Buttons for the picker-elements. So that I can go through the form only with the next-Button instead of pressing "done" and tapping on the next Selectfield. It would be far more comfortable for the user.
So support of the sencha-forum isn't really helpful, see below:
http://www.sencha.com/forum/showthread.php?219636-Native-select-field-for-Android
http://www.sencha.com/forum/showthread.php?205581-Can-I-use-iOS-native-picker-instead-of-ST2-picker
According to this, there are prev- and next buttons available for a picker:
http://www.sencha.com/forum/showthread.php?205159-Ext.picker.Date-with-no-prev-and-next-buttons&p=803794
But I can't find them:-(
I think, there are two solutions to the problem:
Accessing the native Picker as proposed in the first link above. The question is how?
Implementing an own Picker-Element with an Prev- and Next-Button. This seems to be a huge efford for such a basic task.
I can't really believe, that this is such a big deal in a big framework like Sencha Touch.
Anyone facing the same problem and has a working solution?

My only idea for you would to put your picker on the page as normal, then add two buttons on the page - a Prev and Next buttons using Sencha. Then add onTop handlers for those buttons, that use the picker's .setActiveItem() method to set the picker to the next or previous item. Hopefully that will get you on your way.
http://docs.sencha.com/touch/2-0/#!/api/Ext.picker.Picker-method-setActiveItem

Related

Modal drag animations in react-navigation#v6

I've recently upgraded to react-navigation v6 for various functionality upgrades but seem to be having some difficulty understanding the recently added presentation prop available on stack navigators.
I'm working exclusively for IOS and what I basically want to achieve is the same drag-to-close behaviour presentation="modal" gives by default but without the asthetic look of the new screen being stacked on top of the previous screen.
I've made a basic example to highlight what it is I mean which will hopefully make more sense than my words.
If you set presentation to modal inside the Routes.js (line 56), on button click the modal will render and the user is able to drag down on the screen to close it. If however I use presention="transparentModal", you lose the dragging functionality.
Is it possible to get this dragging functionality when using this presentation type?
EDIT
Link to minimal example: https://snack.expo.dev/BpTJ1Cu9m

How to replicate page transitions like in iTunes Quick Tour

If you open your iTunes and in the Help menu select iTunes Quick Tour you will be presented with a guide on how to use the app. I want to create something that resembles the transitions this window has. I am trying to start this using Storyboards instead of programmatically. The dots at the bottom allow you to jump to a specific view as well as transition to the next view or previous view.
I am developing this guide in swift for an OS X application.
1) Would this be easier done using a Page Controller or a Tab View Controller or something entirely else?
2) I googled but couldn't find any guides that were close enough to help me get this done. Any guides for this would be appreciated.

How to display UIAlertView without buttons on iOS 8?

In an app I'm working on we have some legacy code that displays timed UIAlertViews at several points in the application. These are alert views that display for a certain amount of time (let's say 2 seconds) before they disappear.
These alert views don't have buttons, just a title and a message. Somehow these alert views worked just fine on iOS 5, 6 and 7, but on iOS 8 the message label isn't being displayed anymore.
Does anyone have a fix for this issue? I should note we're not interested in using UIAlertController, since that class is limited to iOS 8 and we need to support older versions as well.
So my question is as follows: is it possible on iOS 8 to display an UIAlertView with just a title and a message and NO buttons? (PLEASE NOTE: the message should be shown properly).
For anyone still struggling with this issue, I used the following approach:
I created an AlertController class that decided which version of an alert view to use. For iOS 7 and lower will default to the "build-in" UIAlertView. For iOS 8 I resorted to a custom alert view.
There are several custom alert views that could be used to create a modal dialog that displays for a few seconds. I based my custom alert view on the code from the iOS Custom Alert View project. Additionally I fixed the look and feel. Suffice to say, the default look and feel of this project doesn't closely match the iOS 7 / 8 look and feel, especially with regards to the buttons. The pop / hide animation is pretty well done though. Fixing the look and feel involved creating a custom dialog view class that uses -drawRect: to draw lines around buttons. The custom subview will also add it's own buttons.
An alternative project that might have a better look and feel out-of-the-box is SDCAlertView. If I would have found SDCAlertView before starting my work on fixing iOS Custom AlertView, I would probably have saved some time.
I should note I cannot share my code / changes. My employer would not like this at all.
You can try this code for your UIAlert:
let alert = UIAlertView()
alert.title = "Title"
alert.message = "Message"
alert.show()
It should display a UIAlert without a button.
Hope this can help you.

Removing Android toolbar bar on Sencha Touch

I have two issues with a Sencha Touch application, first is how do I remove the top bar highlighted in red, second is, when I press the back from above bar it goes back fine but when I press the phone's back button it takes me out of application, what can I do? Look at the picture below
I have already tried using navigationBar:hidden or false and autoMaximize:true, also about back button thing I don't have any idea so please suggest me something.
Question 1)
I guess you are using Sencha native packaging, and you have encountered this bug: http://www.sencha.com/forum/showthread.php?259817-3.1.0.256-Strange-Android-Titlebar-on-native-Apps/page2
Quote from richardvd user of Sencha Touch Forums:
This is the Android TitleBar, you can remove it by adding an attribute
to your base AndroidManifest.xml.
In my case this file is located here:
C:\ext\Sencha\Cmd\3.1.1.274\stbuild\st-res\android\AndroidManifest.xml
Open it and add this attribute to the application field:
android:theme="#android:style/Theme.NoTitleBar"
Question 2)
You can control the back button behaviour from Javascript with Cordova/Phonegap:
document.addEventListener("backbutton", yourCallbackFunction, false);
Source: PhoneGap documentation

How to create a Controller to simulate the Springboard feature of the iPhone within your own application

I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial but I am wondering if I am missing something that is already available either as an Apple example or someone who did a tutorial on this.
The image below show how the user would use it.
alt text http://www.agilitesoftware.com/SpringboardExample.png
As they slide their finger to the right (or left) the other image would begin to show up. And it would animate smoothly. The faster you swiped your finger the faster it would move to the next view.
Update: The other feature is that it should mimic the same feel when you slide your hand across the display that is snaps to the current view into place. It should not keep sliding across if there is more than 1 view to the direction you swiping your finger.
I've seen other applications use this so that is why I am asking.
This is accomplished using the UIScrollView with the pagingEnabled property set to true. Just add each of your views, adjust the contentSize, and it will automatically "page" to the width of the screen across the content.
There is a sample app (with code) with exactly this functionality on the iPhone developer site on Apple.com (I believe it's called "PageControl".) - I'd suggest checking it out.
d.
I'm writing an app that uses a similar UI. As NilObject recommended, we're using a UIScrollView with pagingEnabled=YES.
You may also be interested in this example code involving just two child views. I'm trying it out now; it's an interesting technique but I've had to write some additional special-casing code for some odd situations that resulted.
There's also another question on this site that asks about creating a grid of icons like the home screen.
I would check out Joe Hewitt's code from the Three20 project for this. It provides a nice interface and further refinement of the UIScrollView implemented as TTScrollView and TTScrollViewDelegate, TTScrollViewDataSource.