Restarting an activity is pretty straight forward if your app supports HoneyComb and above. Just use Activiy.recreate.
However, when supporting lower api versions you need something equivalent to Activity.recreate.
Yep, thought it was time for another LED flashlight app in the flashlight jungle.
Since Android 5 Lollipop comes with built-in flashlight widget, and precisely because it is a jungle of flashlight apps, I was completely aware that this could turn out to be a tricky project.
Anyway, I decided go for it, but to make this app stand out from the rest I couldn’t develop just another flashlight. It had to be something more.
Including jQuery from Google’s CDN has some advantages. Here are a few:
Perhaps the greatest benefit of including google hosted jQuery is that there is a good chance your visitors may not even need to download jQuery. They might have visited some other website using Google hosted jQuery and already have it downloaded and cached by their browsers.
Google have jQuery distributed across geographically dispersed servers. When a browser resolves the URL for the jQuery file it will automatically get downloaded from the closest available server.
Maximized Parallel Downloads
By not having jQuery on your own domain it can be downloaded in parallel with other stuff.
You can read more on parallel downloads here: Maximizing Parallel Downloads
Many responsive designs push the sidebar (or sidebars) below the main content area at narrower browser window sizes. Nothing wrong with this type of design, it makes sense to have the main content come first. Viewing the content in the sidebar on devices with small screens, however, could mean quite a bit of scrolling. A responsive sidebar in a modal window can solve this.