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 ..
Author : admin
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: public class ReflectionTester throws InstantiationException, IllegalAccessException, ClassNotFoundException { public static Object createObject(String className) { return Class.forName(className).newInstance(); ..
public static Bitmap readBitmap(AssetManager asset, String fileName) throws IOException { InputStream in = asset.open(fileName); Bitmap bitmap = BitmapFactory.decodeStream(in); return bitmap; } Source: http://g..
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. /** * This method hides the soft input window, if it’s open. * * ..