i have written a somewhat small application , yet it runs very slowly on IOS and Android devices , it seems to me that the device takes much time to render the GUI.
i made sure to require every component needed on launch time, my application consists of 5 tab panels , each one contains a navigation view with multiple panels , i have set the autoDestroy property of navigation views to true.
i used sencha 2.0.0.0 and 2.0.1.1 and phone gap cordova 1.7.0 , cordova 1.8.0
Any suggestions?
i made sure to require every component needed on launch time
Because this, your application launches slow. The main reason is all of your elements are added to DOM tree right at startup time (you can inspect your application's DOM tree by Chrome's debugger tool to see it).
The best practice to optimize responsiveness of your application is discussed somewhere, here's one of them:
PhoneGap 1.4 wrapping Sencha Touch 2.X - What about performance?
For your situation, a better way to implement is:
Divide your application into 2 main views, an Ext.TabBar and an Ext.Container
Listen to changes in TabBar clicks, if user changes from a tab to another, remove your view in the main container and add appropriate views. It ensures your application only contains exactly 2 views at any time.
Hope it helps.
Related
I am customizing an NXP based Android 10 BSP on an iMX8 platform and I'm trying to make a custom swipe up bottom sheet that's global to the OS like the status/notifications bar on a swipe down gesture.
I've followed this thread here but customized the swipe up layout to have a list of applications available on the OS (basically a launcher within an app).
While this feature works great within my app, I actually want that slide up layout to be global so that I can launch applications no matter which card/application I'm currently on.
How would I go about doing this since this feature is limited to my main app? Would it be possible to add this to SystemUI?
Yes technically, you can do something like the existing NotificationBar that you can drag from the top of the screen. In your case you'd do from the bottom.
The logic for NotificationPanelView is in SystemUI package.
But beware, the existing logic there is a bit spaghetti code, so it could take a while to understand in order to add your own panel.
Another option for you would be to have your panel as an overlay view on top of everything ( drawn from a background service from your app ). See this answer for some initial guidance.
You'd show at first a transparent view, that receives all inputs. If you detect the gesture, you 'move up' the sheet from the bottom, otherwise you pass the input to apps below.
Note that this:
Would mean your service needs to be a foreground service, so its not killed.
If your app is killed from Settings, the BottomSheet will go away as well.
You cannot show this over the Settings app ( intentional Android limitation)
To recap:
The SystemUI solution would be better long term, less limitations... but more difficult to develop initially.
The App overlay solution is easy to implement, but has several limitations which can be a dealbreaker.
I've been asked to create an app for a client which could potentially be on both android and iOS (concentrating on iOS first). So I thought that Qt may be the answer. I would like to use Qt Quick to create the app but I can't seem to find a way to efficiently handle multiple pages, baring in mind that each page could be fairly heavyweight.
So far I've tried:
Pagination with loaders i.e. dynamically pulling in the needed screen. This works but there is a noticeable delay the first time a screen is loaded
Making each page a component and showing only the necessary screen. This loads all pages on startup which is too memory heavy
Making each page a component and displaying them through a ListView. Same problem as above.
There has to be a middle ground where views can essentially go to a low memory mode like in native iOS apps. Any suggestions welcome.
NOTE: The progression of the screens is not necessarily linear
My experience with QML is rather limited but from other UX experiences I would think the solution would involve re-factoring your pages to utilize the Loader item for their inner children/Components. From what I read it sounds like you are using the Loader item on each page itself.
For example, when your program starts load in your pages, it should be pretty light on memory otherwise there many still be large components that need to be dynamically loaded.
When the user provides input to go to a specific page, animate/show as you would normally which shouldn't be delayed. The page itself should then utilize a Loader item for each component that needs to be loaded (i.e. ones with large memory footprints).
While components are loading you could show a progress bar/wheel animation. Once the component has finished loading via the onLoaded signal you can hide the progress bar/wheel.
You may also want to look at the Loader item's asynchronous property to ensure any animation (i.e. the progress bar/wheel) while the component loads avoid glitches.
Finally when the page needs to be hidden simply set each Loader item's active property to false and it should release the loaded component.
Hope that helps and isn't repeating something you've already tried.
Old question, but Qt.Controls's StackView has support for pushing and popping with various animations.
As the previous answers indicate, using a Loader is also an option but it doesn't let you easily animate the change (when changing views, the old and new are not available at the same time so you can't do nice animations).
An alternative is to use Components, lazily instantiate views and animate the transitions. Check out the example in by QtWS 2015 talk, slides and code available here.
I'm creating my first app in iOS and I'm very accustomed to developing in eclipse for Android. My first step is that I need to create a dashboard as the homescreen. I'm a little "confused" as of which layout I should choose in xcode. In android I always select the most basic of settups, and I end up with a blank activity and a blank layout. That's where I would like to start, since that's what I'm used to. I'm wondering if any experienced iOS dev can point me in the right direction into which template to start with.
It seems really easy to just say to use an empty application, but If I'm going to have to do a lot more settup that is not worth my time, then please enlighten me.
You' probably want to go with a single view application. This will give you a template with a view controller and a blank interface file (your choice of xib or storyboard) that you can build from. From there you can add what ever you want.
Using this template you will immediately be able to build your app to the simulator or to your device. However, if you already have an idea of how you would like your app to work, you could choose tab based if your app should have multiple tabs and most of the work will be done for you, or a utility based app will give you two view controllers, one of which will be presented modally. Etc, etc...
What I want to do is be able to start another Android sub application (which I have not written myself) to run inside a window within my main application. I would want certain touch events etc on the elements of the main app that are still visible to allow me to stop the sub application.
I've found examples of how to launch another activity using an Intent - but I have found nothing allowing me to specify that it runs in a certain window.
Is this possible at all?
The window metaphor does not exist under normal Android.
Some tablet makers have added it to their builds, but using windows would reduce the portability of your app.
I'm working on an android app that has a section that feels like an iPhone home screen. There's a bunch of pages that are essentially displaying the same data in different configurations and users should be able to quickly move between them. Generally there won't be more than 4 or 5 pages.
I could just replicate the experience with the iPhone home screen with multiple dots on the bottom of the page, but that doesn't feel very android-friendly. What's the design pattern in android for viewing and interacting with this type of view? I know the android home screen has a variant with dots, but I've never seen it used within an app.
Screenshots or links to existing apps would be great.
The stock Android launcher has left/right paging behavior on the home screen, and it's open source.
This is the Workspace class. Pay special attention to the onTouchEvent and onInterceptTouchEvent methods. The utility classes Scroller and VelocityTracker are used together to define the behavior for snapping to a page when the user lets go from a drag.
https://android.googlesource.com/platform/packages/apps/Launcher2/+/master/src/com/android/launcher2/Workspace.java
Hootsuite uses this design pattern and it works well in my opinion. I don't think it affects the user experience on Android in a negative way. I find that the biggest problem with people porting iPhone applications to Android is the fact that they try to port every single design pattern over. I don't think what you're trying to implement will be an issue.