本文整理了Java中android.graphics.drawable.Drawable.getLayoutDirection()
方法的一些代码示例,展示了Drawable.getLayoutDirection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.getLayoutDirection()
方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:getLayoutDirection
暂无
代码示例来源:origin: ZieIony/Carbon
clone.setLayoutDirection(dr.getLayoutDirection());
clone.setBounds(dr.getBounds());
clone.setLevel(dr.getLevel());
代码示例来源:origin: AlexMofer/ProjectX
static boolean isLayoutDirectionLTR(Drawable drawable) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
return drawable.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
return true;
}
代码示例来源:origin: MCMrARM/revolution-irc
@TargetApi(Build.VERSION_CODES.M)
@Override
public int getLayoutDirection() {
return mDrawable.getLayoutDirection();
}
代码示例来源:origin: AlexMofer/ProjectX
static void apply(Drawable drawable, int gravity, int w, int h, Rect container, Rect outRect) {
if (drawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
Gravity.apply(gravity, w, h, container, outRect, drawable.getLayoutDirection());
else
Gravity.apply(gravity, w, h, container, outRect);
}
代码示例来源:origin: AlexMofer/ProjectX
static void apply(Drawable drawable, int gravity, float w, float h,
RectF container, RectF outRect) {
if (drawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
gravity = Gravity.getAbsoluteGravity(gravity, drawable.getLayoutDirection());
apply(gravity, w, h, container, 0, 0, outRect);
} else
apply(gravity, w, h, container, 0, 0, outRect);
}
代码示例来源:origin: AlexMofer/ProjectX
static void apply(Drawable drawable, int gravity, float w, float h,
Rect container, RectF outRect) {
if (drawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
gravity = Gravity.getAbsoluteGravity(gravity, drawable.getLayoutDirection());
apply(gravity, w, h, container, 0, 0, outRect);
} else
apply(gravity, w, h, container, 0, 0, outRect);
}
代码示例来源:origin: jbruchanov/AnUitor
data.put("LayoutDirection", getTranslator().layoutDirection(d.getLayoutDirection()));
data.put("IsFilterBitmap", d.isFilterBitmap());
代码示例来源:origin: stackoverflow.com
if (background.getPadding(padding)) {
resetResolvedPadding();
switch (background.getLayoutDirection()) {
case LAYOUT_DIRECTION_RTL:
mUserPaddingLeftInitial = padding.right;
内容来源于网络,如有侵权,请联系作者删除!