I have a design that build a splash page (may with loading icon so "start screen" of iOS is not satisfied) on jQuery Mobile webapp. However I have this page-proceess problem now: The page after splash page is a function list. When user tap one function it will enter one specific function page. The specific page has not 'back' button on page, so user has to press "back" button on browser in order to go back to function list (and then press "forward" to return to specific page). Function list page must not go back to splash page by "back" button on browser.
-------- Auto --------------- User Tap -------------------
| Splash | ------> | Function List | ----------> | Specific Function |
-------- --------------- -------------------
^ | ^ ^
|xxxxxxxxxxxxxxxxxxxxx| |________________________________|
CAN NOT BACK Back & Forward Button of Browser
Here is what I tried:
To begin with, if I do normally with blank hash for splash and another 2 hashed for 2 other pages, lish page has "Back" button enabled and user can tap it to go back to splash page.
If I use changeHash: false from splash to list, when user press "back" button on list, it will go back to splash page but not list page.
If I use $('#splash-page').remove() when list page is shown, when user press "back" button on list, system will re-generate splash page and it will also go back to splash page but not list page.
If I use hashListeningEnabled = false on mobileinit and change it to true when list is shown, it doesn't work. Configure setting may only enabled on mobileinit.
One possible solution is use location.replace('#page-list') method. But it cannot set the transition from splash to list. Setting defaultPageTransition can helps but I has another default transition wanted, set defaultPageTransition face to one specific transition and other transitions in code need lots of work. defaultPageTransition can set only once from tries 4.
So I need a solution without some hacks like tries 5.
Thank you for reading till here.
In addition, My android 2.3 device can not support location.replace, even change location.hash can not be listenned by jQuery Mobile.
Related
I implemented the login, sign-up with jetpack compose on an app. I redirected the logged-in users to the main screen and keep the new user on to the login screen. But the problem is when I redirect the user from the login screen to the main screen and the user press the back button the login screen appears. Now I know it's a normal behavior of the navigation component but I need to change it. How can I do that?
Used this line for navigating to the main screen from the login screen
navController().navigate("main_screen")
You can remove last item from the back stack before navigating to the main screen using popBackStack:
navController.popBackStack()
navController.navigate("main_screen")
The iOS Application have menu button which contains list of events. In the list there is a event of showing a list. And list can be access directly form the main page by clicking on navigation icon(on navigation bar) for list.
The first time I click on list from menu page it works fine but second time it shows a result from last visit. It appears on the top of the list.
So, I have to remove the result which appear in top of list for second time.
It only happens in iOS. Same code for android doesn't give any problem.
I have a website https://www.itraveleo.com. It is on Angular 4 and we use the Kendo-UI for Angular controls. On an iPhone the keyboard keeps opening on the following pages on page load:
Homepage - when I click to go to homepage using the logo or using the menu item, the focus goes to the "To" combobox and the keyboard opens up. This does not happen on initial load of the website
Blog - click on the DREAM menu item. On this page, click on any blog. The focus again goes to the To combobox and the keyboard opens up.
Right below the heading of each blog (on mobile), the category and region is listed (e.g. North America / Asia, etc. and Cosmopolitan / Family Time / Outdoorsy, etc). Click on each of these one by one. Again the To combobox gets focus and the keyboard opens up
Tried multiple common fixes but nothing seems to work on the iPhone (activeElement blur, setting focus on another element)
I'm working on pretty simple web side that cointains login screen (almost same as in demo presentation, white page with login and password) and main screen with sidebar and navigation bar. How should it be done? My plan is to build main screen using navigation bar, sidebar (just few buttons in layout basicly) and few layouts with content of the webside. On each button click change layout used to create content to another one, for example for Schudele button I'm gonna load layout that contains some tables, for About button plain text. Is it good idea?
So finnaly is should look like this:
init() function decides if user is logged or not and display Login page or Main page, Main Page is builded from modules like navbar, sidebar and content, content depends on sidebar buttons click. I'm right?
Handling it on your own is legit way to start or learn Vaadin. If you have a first grasp of this works out, the most common way to handle such a scenario is the use of the Navigator See the book of Vaadin.
With the Navigator you define Views and give them a name, register them with the Navigator. Then you can navigate your application with the Navigator, it takes care to give you nice ...#!view... URLs so the Users can have bookmarks and navigate your app also e.g. with the back button in the browser.
The Navigator hooks into an event system, where listeners (ViewChangeListener) can react to "before enter" and "leave". The "before enter" can be used to realize auth needs, since they are allowed to object entering a view.
I'm using angular in a rails app and have ui-router set up with several states.
name: 'item'
url: '/items'
child states
name: detail
url: "/{item_id:[0-9]{1,4}}/detail"
parent: item
I'm transition between states using
$state.go('detail', item_id: id)
All appears to be working fine except when I click the back button on the browser.
When the back button is clicked the location in the browsers address bar correctly changes to show the unique url of the previous state however the ui-router doesn't seem to change state and I get no $stateChangeStart event.
Is this the normal behaviour of ui-router or have I got something set up incorrectly?
If it is the normal behaviour is there any way I can force a state change when the back button is clicked?
The normal behaviour of ui-router is, that the browser back button is working out of the box (exactly as we would expect).
Try to play with this example, there is also the listener '$stateChangeStart' writing into console
.run(function($rootScope, $location){
$rootScope.$on('$stateChangeStart',
function (event, toState, toParams){
console.log(toParams)
});
})
(click the blue icon in the right top corner, to open the preview in separated window) ... you can navigate among few details and then use backspace keyobard to mimic the back button... all is correctly re-trigerred... check it here