android.view.Gravity.isVertical()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(82)

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

Gravity.isVertical介绍

暂无

代码示例

代码示例来源:origin: wdullaer/MaterialDateTimePicker

public VerticalTextView(Context context, AttributeSet attrs){
  super(context, attrs);
  final int gravity = getGravity();
  if (Gravity.isVertical(gravity) && (gravity&Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity&Gravity.HORIZONTAL_GRAVITY_MASK) | Gravity.TOP);
    topDown = false;
  } else {
    topDown = true;
  }
}

代码示例来源:origin: ZieIony/Carbon

if (!Gravity.isVertical(gravity)) {
  if (height < 0) {
    gravity |= Gravity.FILL_VERTICAL;

代码示例来源:origin: multidots/android-app-common-tasks

public VerticalTextViewLeft(Context context, AttributeSet attrs) {
  super(context, attrs);
  final int gravity = getGravity();
  if (Gravity.isVertical(gravity)
      && (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity & Gravity.HORIZONTAL_GRAVITY_MASK)
        | Gravity.TOP);
    topDown = false;
  } else {
    topDown = true;
  }
}

代码示例来源:origin: multidots/android-app-common-tasks

public VerticalTextViewLeft(Context context, AttributeSet attrs) {
  super(context, attrs);
  final int gravity = getGravity();
  if (Gravity.isVertical(gravity)
      && (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity & Gravity.HORIZONTAL_GRAVITY_MASK)
        | Gravity.TOP);
    topDown = false;
  } else {
    topDown = true;
  }
}

代码示例来源:origin: multidots/android-app-common-tasks

public VerticalTextViewRight(Context context, AttributeSet attrs) {
  super(context, attrs);
  final int gravity = getGravity();
  if (Gravity.isVertical(gravity)
      && (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity & Gravity.HORIZONTAL_GRAVITY_MASK)
        | Gravity.TOP);
    topDown = true;
  } else {
    topDown = false;
  }
}

代码示例来源:origin: multidots/android-app-common-tasks

public VerticalTextViewRight(Context context, AttributeSet attrs) {
  super(context, attrs);
  final int gravity = getGravity();
  if (Gravity.isVertical(gravity)
      && (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity & Gravity.HORIZONTAL_GRAVITY_MASK)
        | Gravity.TOP);
    topDown = true;
  } else {
    topDown = false;
  }
}

代码示例来源:origin: fython/Blackbulb

public VerticalTextView(Context context, AttributeSet attrs){
  super(context, attrs);
  final int gravity = getGravity();
  if (Gravity.isVertical(gravity) && (gravity&Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity&Gravity.HORIZONTAL_GRAVITY_MASK) | Gravity.TOP);
    topDown = false;
  } else {
    topDown = true;
  }
}

代码示例来源:origin: alhazmy13/HijriDatePicker

public VerticalTextView(Context context, AttributeSet attrs){
  super(context, attrs);
  final int gravity = getGravity();
  if (Gravity.isVertical(gravity) && (gravity&Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity&Gravity.HORIZONTAL_GRAVITY_MASK) | Gravity.TOP);
    topDown = false;
  } else {
    topDown = true;
  }
}

代码示例来源:origin: andresth/Kandroid

public VerticalTextView(Context context, AttributeSet attrs){
  super(context, attrs);
  final int gravity = getGravity();
  if(Gravity.isVertical(gravity) && (gravity&Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
    setGravity((gravity&Gravity.HORIZONTAL_GRAVITY_MASK) | Gravity.TOP);
    topDown = false;
  }else
    topDown = true;
}

代码示例来源:origin: ViHtarb/Tooltip

RectF contentViewRect = Utils.calculateRectOnScreen(mContentView);
float x, y;
if (Gravity.isVertical(mGravity)) {
  x = mContentView.getPaddingLeft() + Utils.dpToPx(2);
  float centerX = (contentViewRect.width() / 2f) - (mArrowView.getWidth() / 2f);

代码示例来源:origin: ViHtarb/Tooltip

if (Gravity.isVertical(mGravity)) {
  arrowLayoutParams = new LinearLayout.LayoutParams((int) builder.mArrowWidth, (int) builder.mArrowHeight, 0);
} else {

代码示例来源:origin: AmaldevTA/ChipLayout

if(Gravity.isVertical(lp.gravity)) {
  switch (lp.gravity) {
    case Gravity.TOP:

代码示例来源:origin: enricocid/LaunchEnr

if (Gravity.isVertical(((FrameLayout.LayoutParams) getLayoutParams()).gravity)) {

代码示例来源:origin: enricocid/LaunchEnr

setX(x);
if (!Gravity.isVertical(gravity)) {
  setY(y);

相关文章