Java Code Examples for android.graphics.drawable.Drawable#isAutoMirrored()

The following examples show how to use android.graphics.drawable.Drawable#isAutoMirrored() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DrawerLayout.java    From Dashchan with Apache License 2.0 5 votes vote down vote up
/**
 * Change the layout direction of the given drawable.
 * Return true if auto-mirror is supported and drawable's layout direction can be changed.
 * Otherwise, return false.
 */
@TargetApi(Build.VERSION_CODES.M)
private boolean mirror(Drawable drawable, int layoutDirection) {
	if (drawable == null || !(C.API_KITKAT && drawable.isAutoMirrored())) {
		return false;
	}

	if (C.API_MARSHMALLOW) {
		drawable.setLayoutDirection(layoutDirection);
	}
	return true;
}
 
Example 2
Source File: DrawableCompatKitKat.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static boolean isAutoMirrored(Drawable drawable) {
    return drawable.isAutoMirrored();
}
 
Example 3
Source File: DrawableCompatKitKat.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public static boolean isAutoMirrored(Drawable drawable) {
    return drawable.isAutoMirrored();
}
 
Example 4
Source File: DrawableCompatKitKat.java    From guideshow with MIT License 4 votes vote down vote up
public static boolean isAutoMirrored(Drawable drawable) {
    return drawable.isAutoMirrored();
}