Bootstrap 3 collapsed menu doesn’t close on click

Just to share this from solutions on GitHub, this was the popular answer: https://github.com/twbs/bootstrap/issues/9013#issuecomment-39698247 $(document).on(‘click’,’.navbar-collapse.in’,function(e) { if( $(e.target).is(‘a’) ) { $(this).collapse(‘hide’); } }); This is wired to the document, so you don’t have to do it on ready() (you can dynamically append links to your menu and it will still work), and it only gets … Read more

C# WPF Navigation Between Pages (Views)

Using MVVM is absolutely fine as it will simplify the implementation of your requirement. WPF is build to be used with the MVVM pattern, which means to make heavy use of data binding and data templates. The task is quite simple. Create a UserControl (or DataTemplate) for each view e.g., WelcomePage and LoginPage with their … Read more

Windows Phone 8.1 Universal App terminates on navigating back from second page?

This is new to Windows Phone 8.1. If you create a new Hub Universal App using a VS2013 template, you’ll notice a class in Common folder called a NavigationHelper. This NavigationHelper gives you a hint how to properly react to back button press. So, if you don’t want to use the NavigationHelper, here’s how to … Read more

Is it possible to create turn-by-turn GPS navigation app on Android/iOS using Google Maps?

I agree with the answer stated above but there is also a key clause in section 10.4.c of the google maps API privacy terms here. It states No navigation. You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; or (b) automatic or autonomous vehicle control. … Read more

Change background color of single specific menu items of navigationView

Change background color of single specific menu items AFAIK Using menu this is not possible you need to create custom navigationView When you use BackgroundColorSpan to set background to your menu item it only set the background to menu item title not whole view OUTPUT USING BackgroundColorSpan Try this way using RecyclerView activity_main.xml <?xml version=”1.0″ … Read more

Detecting Back Button/Hash Change in URL

The answers here are all quite old. In the HTML5 world, you should the use onpopstate event. window.onpopstate = function(event) { alert(“location: ” + document.location + “, state: ” + JSON.stringify(event.state)); }; Or: window.addEventListener(‘popstate’, function(event) { alert(“location: ” + document.location + “, state: ” + JSON.stringify(event.state)); }); The latter snippet allows multiple event handlers to … Read more

Same Navigation Drawer in different Activities

If you want a navigation drawer, you should use fragments. I followed this tutorial last week and it works great: http://developer.android.com/training/implementing-navigation/nav-drawer.html You can also download sample code from this tutorial, to see how you can do this. Without fragments: This is your BaseActivity Code: public class BaseActivity extends Activity { public DrawerLayout drawerLayout; public ListView … Read more

Retaining GET request query string parameters on JSF form submit

Your concrete problem is caused because a JSF <h:form> submits by default to the current request URL without any query string. Look closer at the generated HTML output, you’ll see <form action=”/app/agreement.xhtml” …> You’d thus explicitly need to include those request parameters yourself. There are several ways to solve this. If you weren’t sending a … Read more