本文整理了Java中android.widget.ImageButton.setX()
方法的一些代码示例,展示了ImageButton.setX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.setX()
方法的具体详情如下:
包路径:android.widget.ImageButton
类名称:ImageButton
方法名:setX
暂无
代码示例来源:origin: asyl/ArcAnimator
@Override
public void onAnimationEnd() {
mRed.setVisibility(View.INVISIBLE);
mRed.setX(startRedX);
mRed.setY(startRedY);
release();
}
});
代码示例来源:origin: stackoverflow.com
ImageButton charButton = (ImageButton) findViewById(R.id.goodIcon);
RelativeLayout gameLayout = (RelativeLayout) findViewById(R.id.gameLayout);
int width = gameLayout.getWidth();
int height = gameLayout.getHeight();
charButton.setImageDrawable(x);
int x = width;
int y = height;
Random buttonPlace = new Random();
int buttonY = buttonPlace.nextInt(y-100)+100;
int buttonX = buttonPlace.nextInt(x-50)+50;
charButton.setX(buttonX);
charButton.setY(buttonY);
代码示例来源:origin: stackoverflow.com
System.out.println("Width is" + width);
imagebutton1.setX(width); //changes button position
imagebutton1.setY(height);
代码示例来源:origin: safetysystemtechnology/audio-recorder-button
public void changeSizeToRemove() {
if (this.mImageButton.getLayoutParams().width != this.mImageView.getWidth()) {
this.mImageButton.getLayoutParams().width = this.mImageView.getWidth();
this.mImageButton.getLayoutParams().height = this.mImageView.getHeight();
this.mImageButton.requestLayout();
this.mImageButton.setX(0);
}
}
代码示例来源:origin: stackoverflow.com
private void setupBalloon(ImageButton b, int i) {
int imageId = (int)(Math.random() * images.length);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
b.setLayoutParams(params);
b.setImageResource(images[imageId]);
b.setBackgroundColor(Color.TRANSPARENT);
b.setScaleX(0.4f);
b.setScaleY(0.4f);
b.setX((float) (Math.random() * (width - b.getWidth())));
b.setY((float) (Math.random() * (height - b.getHeight())));
b.setVisibility(View.VISIBLE);
}
代码示例来源:origin: stackoverflow.com
mIb.setX(xI);
mIb.setY(yI);
代码示例来源:origin: safetysystemtechnology/audio-recorder-button
this.mImageButton.setX(0);
内容来源于网络,如有侵权,请联系作者删除!