android.graphics.drawable.Drawable.getLayoutDirection()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中android.graphics.drawable.Drawable.getLayoutDirection()方法的一些代码示例,展示了Drawable.getLayoutDirection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.getLayoutDirection()方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:getLayoutDirection

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;

相关文章