Snippets

Small pieces of code that can be copy/paste-ed on your project

  1. Home
  2. chevron_right
  3. Snippets
  4. (Page 2)

Get Android OS Version

Snippets
If you ever need to get the version of the OS on which your app runs, you can try this out: android.os.Build.VERSION.SDK_INT And you can use it against(for more check…

Share image Intent

Snippets, Solutions
Whenever you need to share an image from the external storage you can use the startActivity method and an Intent to do that. Doing so, the user will be able to…

Android Gradle & Manifest merge

Snippets, Solutions
[Deprecated] This post is now deprecated, the Manifest Merger has changed since my first post. You can find more about this on the android developers site. Manifest file & Gradle…

Clear Fragment back stack

Snippets
To clear the Fragments back stack of a FragmentManager, you could iterate through all back stack items and call popBackStack() but there is also a more elegant solution. Please see…
sponsored
Exit mobile version