Export sharedPreferences to file

With the getAll function of sharedPreferences it is possible to save the shared preferences to a file. The following code example is probably the easyest way to do it. With the saveSharedPreferences method you can save all shared preferences a file to the root of your sdcard.

Make sure your App has the following permission. It allows the application to write to external storage.

Ripple effect on touched item

Google has started to use ripple animations in Material Design UIs. The setHotspot() method is added in API Level 21. This teaches the drawable a “hot spot”, and the RippleDrawable apparently uses this as the emanation point for the ripple effect. The setHotspot() method of a view take the x,y values from the MotionEvent to set the hot spot coordinates.

Source: http://commonsware.com/

Android Reflection-API Constructor without parameters

If you have to create an object with default constructor, you can invoke the newInstance() method on a Class.
This simple class creates the instance of a named class using the empty default constructor by calling the newInstance method:

Read bitmap from asset

Source: http://github.com/

Hide Keyboard

Request to hide the soft input window from the context of the window that is currently accepting input. This should be called as a result of the user doing some actually than fairly explicitly requests to have the input window hidden.

Source: https://www.reddit.com/r/androiddev/wiki/utilities