android.widget.ImageButton.getX()方法的使用及代码示例

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

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

ImageButton.getX介绍

暂无

代码示例

代码示例来源:origin: asyl/ArcAnimator

void upRed() {
  startRedX = mRed.getX();
  startRedY = mRed.getY();
  ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(mRed, "y", mRed.getY(),
      mBluePair.getBottom() - mRed.getHeight() / 2);
  objectAnimator.addListener(new SimpleListener() {
    @Override
    public void onAnimationEnd(Animator animation) {
      disappearRed();
    }
  });
  objectAnimator.setDuration(650);
  objectAnimator.setInterpolator(ACCELERATE_DECELERATE);
  objectAnimator.start();
}

代码示例来源:origin: stackoverflow.com

ImageButton im = (ImageButton) findViewById(R.id.ur_btn);
     im.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View view) {
             float x = im.getX();
             float y = im.getY();
           }
         });
   }
   private void addCircleBehindRectangle(int x, int y){
     RelativeLayout parent = (RelativeLayout) findViewById(R.id.my_relative_layout);
     ImageView iv = new ImageView(this);
     RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(x, y);
     //optional margin l/r
     params.leftMargin = 50;
     params.topMargin = 60;
     parent.addView(iv, params);
   }

代码示例来源:origin: safetysystemtechnology/audio-recorder-button

this.initialXImageButton = this.mImageButton.getX();

代码示例来源:origin: stackoverflow.com

protected void onStart() {
  super.onStart();
  rel.drawCircle(pontos,center.getX() + center.getWidth()/2,center.getY() + center.getHeight()/2);
  rel.invalidate();

相关文章

ImageButton类方法