本文整理了Java中android.widget.ImageButton.getX()
方法的一些代码示例,展示了ImageButton.getX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.getX()
方法的具体详情如下:
包路径:android.widget.ImageButton
类名称: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();
内容来源于网络,如有侵权,请联系作者删除!